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

Dispatch events on contentEditable elements #216

Merged

Conversation

luisherranz
Copy link
Contributor

I was taking a look to see why Notion was not working properly and I noticed that for fields that are contentEditable, the events are not dispatched because the contentEditable wrapper doesn't have the element.dispatchEvent method bonded. Therefore, this conditional is never run.

I wonder if that was on purpose or not. Notion seems to depend on the input event, so it woks fine after this modification.

@fregante
Copy link
Owner

I wonder if that was on purpose

Probably not! Your change makes sense, did you have a chance to test it? Does it fix the issue?

@fregante fregante added the bug label Sep 18, 2021
@luisherranz
Copy link
Contributor Author

Oh yes, it fixes Notion and doesn't break any other sites that I use 😄

@fregante fregante changed the title Dispatch events on contentEditable elements Dispatch events on contentEditable elements Sep 18, 2021
@fregante fregante merged commit 765dc7a into fregante:main Sep 18, 2021
@luisherranz luisherranz deleted the dspatch-events-on-contenteditable branch October 7, 2021 08:53
@fregante
Copy link
Owner

I just realized that this was never shipped. Now it's in https://github.com/fregante/GhostText/releases/tag/22.3.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants