瀏覽代碼

Merge branch 'main' into add-anchor-plugin

Caleb Porzio 1 年之前
父節點
當前提交
11a122d26c
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      packages/ui/src/menu.js

+ 1 - 3
packages/ui/src/menu.js

@@ -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.
@@ -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) {