Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus is immediately applied on open, may cause trouble! #755

Open
nickschot opened this issue Sep 8, 2022 · 2 comments
Open

Focus is immediately applied on open, may cause trouble! #755

nickschot opened this issue Sep 8, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nickschot
Copy link
Member

Currently we immediately apply the focus-trap even if an animation is still about to happen. This may cause problems if something like an ember-tether is rendered inside the modal as the modal might still be moving.

This could be solved by utilizing the checkCanFocusTrap hook: https://github.com/focus-trap/focus-trap#createoptions . We can pass it a promise that resolves once the animation is complete.

We might want similar behaviour when closing the modal

@nickschot nickschot added the bug Something isn't working label Sep 8, 2022
@pichfl
Copy link
Contributor

pichfl commented Oct 15, 2022

This should be easier to implement once #672 is merged.

@marcin-wicha
Copy link

marcin-wicha commented Jul 25, 2023

I've run into exactly this issue today while using a tooltip based on ember-tether.
It's rendered in the middle of the page as the modals slides in.

Both issues references as blockers for #672 have been merged, is there anything else blocking us?
I can submit a PR if you're short for time, I could just use a little more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants