Skip to content

Commit

Permalink
Merge branch 'main' into add-anchor-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Nov 1, 2023
2 parents e67d428 + 6344404 commit 11a122d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/ui/src/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ function handleRoot(el, Alpine) {
__activeEl: null,
__isOpen: false,
__open(activationStrategy) {
if (! activationStrategy) activationStrategy = dom.first

this.__isOpen = true

// Safari needs more of a "tick" for focusing after x-show for some reason.
Expand All @@ -42,7 +40,7 @@ function handleRoot(el, Alpine) {
this.$refs.__items.focus({ preventScroll: true })

// Activate the first item every time the menu is open...
activationStrategy(Alpine, this.$refs.__items, el => el.__activate())
activationStrategy && activationStrategy(Alpine, this.$refs.__items, el => el.__activate())
})
},
__close(focusAfter = true) {
Expand Down

0 comments on commit 11a122d

Please sign in to comment.