Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Suppress default-prevented composition events on compositionstart instead of compositionupdate #15346

Merged
merged 1 commit into from Aug 16, 2017

Conversation

nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Aug 16, 2017

Fixes #15344

In #15314, @as-cii found a workaround to composition events still firing after a default-prevented keydown event. Unfortunately, applying this workaround in the compositionupdate handler instead of the compositionstart handler meant we still created a composition checkpoint. Then, on the next input event, we detected the presence of this checkpoint and reverted to it, causing the cursor to move as in #15344.

This PR moves the same logic from #15314 to compositionstart and avoids creation of a composition checkpoint following a default-prevented keydown event.

/cc @as-cii @ungb @Ben3eeE

This avoids creating a composition checkpoint and reverting to it on the
next keystroke, which causes the cursor to move.
@ungb
Copy link
Contributor

ungb commented Aug 16, 2017

Was able to verify this fixes issue #15344! LGTM 💯 ✨

@nathansobo nathansobo merged commit ccb3aaa into master Aug 16, 2017
@nathansobo nathansobo deleted the ns-fix-alt-bindings branch August 16, 2017 23:23
@oggy
Copy link
Contributor

oggy commented Aug 17, 2017

Wonderful, working for me too. Thanks for the quick fix @nathansobo !

as-cii pushed a commit that referenced this pull request Aug 21, 2017
Suppress default-prevented composition events on compositionstart instead of compositionupdate
as-cii pushed a commit that referenced this pull request Aug 21, 2017
Suppress default-prevented composition events on compositionstart instead of compositionupdate
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants