Replies: 2 comments
-
I added a failing test here: #4031 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fixed in #d17b248 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following structure will throw, when trying to select the menu items with keyboard (arrow up/down)
cdn.min.js:5 Uncaught TypeError: Cannot read properties of undefined (reading '_x_dataStack')
The error is triggered by this keyboard listener https://github.com/alpinejs/alpine/blob/main/packages/ui/src/menu.js#L101 and happens in https://github.com/alpinejs/alpine/blob/main/packages/ui/src/menu.js#L177 because the
parent
argument is undefined.I created a code sandbox to demonstrate. It copies the example markup from https://alpinejs.dev/component/headless-menu and wraps the menu items in a template:
https://codesandbox.io/p/sandbox/alpine-menu-4cg7t5?file=%2Findex.html%3A31%2C5-87%2C11
let me know if there's anything else I can provide 😄
Beta Was this translation helpful? Give feedback.
All reactions