-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ensure there is an animatable root node This is a bit sad, but it is how Vue works... We used to render just a simple PopoverPanel that resolved to let's say a `<div>`, that's all good. Because the native `<transition>` component requires that there is only 1 DOM child (regardless of the Vue "tree"). This is the sad part, because we simplified focus trapping for the Popover by introducing sibling hidden buttons to capture focus instead of managing this ourselves. Since we can't just return multiple items we wrap them in a `Fragment` component. If you wrap items in a Fragment, then a lot of Vue's magic goes away (automatically adding `class` to the root node). Luckily, Vue has a solution for that, which is `inheritAttrs: false` and then manually spreading the `attrs` onto the correct element. This all works beautiful, but not for the `<transition>` component... so... let's move the focus trappable elements inside the actual Panel and update the logic slightly to go to the Next/Previous item instead of the First/Last because the First/Last will now be the actual focus guards. * update changelog * make TypeScript a bit happier * improve `default` slot in `PopoverPanel`
- Loading branch information
1 parent
0260afa
commit 255fc36
Showing
5 changed files
with
43 additions
and
37 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
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