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: should ignore "Enter" shortcut when composing in safari #3445

Closed
wants to merge 1 commit into from

Conversation

odex21
Copy link
Contributor

@odex21 odex21 commented Sep 13, 2021

In version 1.x, keybinding uses keyCode, while in version 2.x it uses key, which leads to differences in keyboard events when using the input method.
In safar, chrome and firefox, pressing Enter in the input method state gives them different behaviour.

  • Safari, the key is Enter, keyCode 229, isComposing is false.
  • Firefox, key is Process, keyCode 229, isComposing is true.
  • Chrome, key is Enter, keyCode 229, isComposing is true

This difference causes pressing enter when using the input method in Safari to result in the insertion of a blank line, which leads to incorrect data.

@luin luin self-requested a review December 14, 2022 13:39
@luin luin added this to the 2.0 milestone Dec 14, 2022
Copy link
Member

@luin luin left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I think "Backspace" also has a similar issue that is when you press it to exit IME, Quill actually performs a deletion additionally.

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.

None yet

2 participants