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

Composition events support #66

Open
ilyamore88 opened this issue Jan 18, 2024 · 1 comment
Open

Composition events support #66

ilyamore88 opened this issue Jan 18, 2024 · 1 comment
Assignees

Comments

@ilyamore88
Copy link
Member

ilyamore88 commented Jan 18, 2024

Implement composition input types support in Block Tool Adapter.

https://github.com/editor-js/document-model/blob/main/packages/dom-adapters/src/BlockToolAdapter/index.ts#L109

@ilyamore88
Copy link
Member Author

ilyamore88 commented Jan 23, 2024

Browsers differences

The beforeinput event has two input types for composition. It is insertCompositionText and insertFromComposition. When the user starts typing, he uses Option + ` combination. It fires the beforeinput event with the input type insertCompositionText. Then, the user can type the symbol he wants to use in the composition.

Safari

When the user types some symbol, we receive a beforeinput event with the inputType insertFromComposition.
Demo:

Screen.Recording.2024-01-23.at.20.56.45.mov

Chrome

When the user types some symbol, we receive a beforeinput event with the inputType insertCompositionText.
Demo:

Screen.Recording.2024-01-23.at.21.00.17.mov

Bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=1022204

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

No branches or pull requests

1 participant