Caleb Porzio 1 năm trước cách đây
mục cha
commit
524deb52d7
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      packages/ui/src/menu.js

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

@@ -30,7 +30,6 @@ function handleRoot(el, Alpine) {
                 __activeEl: null,
                 __isOpen: false,
                 __open(activationStrategy) {
-                    if (! activationStrategy) activationStrategy = dom.first
 
                     this.__isOpen = true
 
@@ -42,7 +41,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) {