Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix long pressed accents on Chrome+macOS #3113
Is this adding or improving a feature or fixing a bug?
Fixing a bug
What's the new behavior?
On macOS, long press triggers an IME to insert an accent. Browsers that implements
How does this change work?
If we detect macOS && Chrome, the we proceed to check if the DOM selection has been updated before the input event and a detection of a selection change. The check is very naive but enough for this particular case. This can't happen when previous editor selection was expanded I guess.
I had to expose through a query the composition state of the before plugin, this is used to discard completely this fix in case of a user using another IME.
This issue was also fixed by #3041 but the fix is more trustworthy in my opinion, as we are not relying on any previous input.
I couldn't figured out how to test this with the current toolchain.
Have you checked that...?
Does this fix any issues or need any specific reviewers?