Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable interaction while editing text on interactives? #542

Open
hchiam opened this issue Nov 26, 2021 · 3 comments
Open

Disable interaction while editing text on interactives? #542

hchiam opened this issue Nov 26, 2021 · 3 comments
Labels
🔥 enhancement New feature or request

Comments

@hchiam
Copy link
Contributor

hchiam commented Nov 26, 2021

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

@argyleink
Copy link
Collaborator

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!

@argyleink argyleink added the 🔥 enhancement New feature or request label Nov 30, 2021
@hchiam
Copy link
Contributor Author

hchiam commented Dec 1, 2021

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

@argyleink
Copy link
Collaborator

that's quite the wiggly scenario! i wonder if it's a bug in preventDefault() or stopPropagation()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants