Don’t remove last char when deadkey is pressed.#30
Open
Nuclear-Squid wants to merge 1 commit intoOneDeadKey:masterfrom
Open
Don’t remove last char when deadkey is pressed.#30Nuclear-Squid wants to merge 1 commit intoOneDeadKey:masterfrom
Nuclear-Squid wants to merge 1 commit intoOneDeadKey:masterfrom
Conversation
4e8ec9a to
3faa4ea
Compare
Collaborator
|
This is really peculiar. I can’t reproduce the bug you’ve explained with so much detail, and your patch introduces a regression on my side — with Ergo-L 0.99.2, pressing Wild guess : this happens because you already type in Ergo-L in the Ergo-L emulation input, and I’m using Lafayette. So we do have an issue here, but we need to nail it very precisely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As I stated in #29, dead keys remove the last character of the input field. I included a gif bellow to show how to reproduce the bug (just type something, then input a dead key other than
1dk).This is because when a deadkey is pressed, the event listner in
demo.jsis called twice in quick succession. It’s supposed to be called once, to delete the key hint the browser automatically writes (since x-keyboard gives way better hints), but the extra call also deletes another character.Logging those events (see gif, on the right hand side) shows they are basically the same, except the first event has the
isComposingfield set totrueand the second one tofalse.Removing the last char only when
event.isComposingis set totruefixes that problem, and seems to be the only event we care about, if I understand MDN’s documentation correctly, though there may be an edge case I don’t know about (god knows JS has a lot of those…).