Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent cancelling transitions due to focus trap (#1664)
* focus trap after transitions Whenever you focus an element mid transition, the browser will abrublty stop/cancel the transition and it will do anything it can to focus the element. This has a very annoying side effect that this causes very abrubt transitions (instant) in some browsers. To fix this, we used to use `el.focus({ preventScroll: true })` which works in Safari and it used to work in Chrome / Firefox, but there are probably other variables that we have to keep in mind here (didn't figure out _why_ this used to work and not anymore). That said, instead of trying to fight the browser, we will now wait an animation frame before even trying to focus any elements. * update changelog
- Loading branch information
1 parent
fc7def3
commit 7a6220a
Showing
4 changed files
with
68 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters