keydown with window not working #4392
Replies: 1 comment
-
The problem was missing x-data... |
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
-
Very basic version of keydown events on window seem to not work.
I am expecting FOOBAR to be printed out to console when pressing p on my keyboard.
I tried changing event to keyup. Element type to anchor is not working either, that is what I was trying first. Also changing the scope to .document instead of .window did not help. Changing the key -- to escape -- was also not fixing this.
For some reason, the key event works if I load the element dynamically using HTMX.
Tested with Firefox, Safari and Brave browsers.
Beta Was this translation helpful? Give feedback.
All reactions