.prevent
doesn't work when event scope is .window
#3277
Replies: 4 comments 5 replies
-
Have you tried |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. So far none of these have worked in Firefox (but all 4 work in Brave/Chrome)
Does the order of the modifiers make a difference (i.e. |
Beta Was this translation helpful? Give feedback.
-
These both work. Needed to use |
Beta Was this translation helpful? Give feedback.
-
I think there is a regression or something I don't understand that is related to this. I have a "drag and drop" div, like so: <div
@dragover.stop.prevent.throttle="isDraggingOver = true"
@dragover.prevent.window.throttle.500ms="handleOutsideDragover($el, $event)"
@drop.prevent="alert('heya')"
><p>test</p></div> Using Alpine 3.10.5 or 3.12.0, when I drag a file into this div, By accident while debugging I pulled in Alpine.js 2.3.0, and this behaves as expected: dragging over the div does not call Safari 16.3 |
Beta Was this translation helpful? Give feedback.
-
I am trying to make a search modal appear when the user presses
/
however, this shortcut is used by my browser (Firefox), and I can't seem to get prevent to work.e.g.
Am I doing something wrong, or is this a bug?
PS- I get the same results when using
ctrl+k
so bonus points if the solution fixes that as well.Beta Was this translation helpful? Give feedback.
All reactions