Open hchiam opened 2 years ago
oh interesting! i usually use the keyboard to navigate to it, but it'd be much nicer to have the ability to suspend events on elements just in time. this would be very cool to combine with a hotkey, so you could hover things and access their children, but explicitly prevent firing events on interaction when needed. very cool!
Actually, this bug might be a thing specific to a project I'm working on*
i tested editing text a little more thoroughly. here's some test cases:
tried editing text: | doesn't trigger event listener? |
---|---|
<a> without click event |
✅ doesn't trigger |
<a> with click event |
✅ doesn't trigger |
<button> without click event |
✅ doesn't trigger |
<button> with click event |
✅ doesn't trigger |
*<a> with mouseup event |
❌ triggers event |
that's quite the wiggly scenario! i wonder if it's a bug in preventDefault()
or stopPropagation()
?
e.g. when you try to edit the text on a button, don't trigger the click event (i.e., disable event listeners?)
https://stackoverflow.com/a/17167316