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

fix: propagate keydown events from excalidraw-wysiwyg inputs #5099

Merged
merged 2 commits into from Apr 27, 2022

Conversation

pomdtr
Copy link
Contributor

@pomdtr pomdtr commented Apr 26, 2022

These events are necessary from vscode side to fix: excalidraw/excalidraw-vscode#41

Here is a quick schema explaining the vscode logic:

image

@vercel
Copy link

vercel bot commented Apr 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
excalidraw ✅ Ready (Inspect) Visit Preview Apr 27, 2022 at 5:40PM (UTC)
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Apr 27, 2022 at 5:40PM (UTC)

@pomdtr pomdtr requested a review from dwelle April 26, 2022 08:43
@pomdtr pomdtr changed the title fix: propagate keydown events from excalidraw-wysiwyg fix: propagate keydown events from excalidraw-wysiwyg textareas Apr 26, 2022
@pomdtr pomdtr changed the title fix: propagate keydown events from excalidraw-wysiwyg textareas fix: propagate keydown events from excalidraw-wysiwyg inputs Apr 26, 2022
@pomdtr pomdtr requested a review from ad1992 April 27, 2022 07:34
Comment on lines 81 to 86
if (
event.target instanceof HTMLInputElement &&
event.target.classList.contains("excalidraw-wysiwyg")
) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually shouldn't be necessary looking at it, since this is called only after we check that we're not in a writable element

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this is not necessary

@pomdtr pomdtr merged commit ea51251 into master Apr 27, 2022
@pomdtr pomdtr deleted the propagage-keydown-from-textarea branch April 27, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy and paste not working within text elements on MacOS
2 participants