-
Notifications
You must be signed in to change notification settings - Fork 530
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
Comment editor crashes when writing diacritics #2298
Comments
Comment Author: @MikkCZ Created attachment 9224166
|
Comment Author: @MikkCZ Observation, the "offset" in the error message differs based on what you write. This happens in the middle of the text as well. Also when you use the keys in the row below F-keys, which by default in Czech layout write "ěščřžýáíé", directly, everything works. But note, this is only a partial workaround, because not all letters with diacritics can be written like that. |
Comment Author: @Pike Can you test this on https://www.slatejs.org/examples/mentions? Maybe this is an upstream bug. |
Comment Author: @MikkCZ I wasn't able to reproduce it there, however I see that #1955 updated slate, and in the issue tracker of slate there is a ton of bugs (some specific to Firefox) that it does not handle the cursor position properly under all conditions. In this specific case and after looking at the error message in more detail, I guess something looses the information about number of characters being actually typed. When you start by pressing the acute/caron key (with or without Shift), |
@mathjazz can I be assigned to this one |
I was able to reproduce this upstream, and ianstormtaylor/slate#4136 is exactly this, AFAICT. I don't know that we have a way to fix this, short of wrapping slate in an error boundary, and reloading it with an empty comment on crash? |
I tried to reproduce (using the Apple Wireless Keyboard with Slovenian layout) and the sequence of characters in the original comment didn't trigger the error. However, I could reproduce the issue using the following sequence:
However, I was unable to reproduce on https://www.slatejs.org/examples/plaintext (which is what ianstormtaylor/slate#4136 references). |
The kicker is that you need to start with an empty inbox. Then add a diacritic, add a char, move, delete, crash. |
Ah, thanks. Let's continue as agreed on the meeting (i.e. as you suggested), sorry for the false alarm. |
The same error appears when you type |
I am no longer able to reproduce this upstream, so it seems like updating Slate could be the way forward here? At least as a short-term fix. A long-term fix is #3010. |
@Mitch4sho Welcome back. :) Please start here: |
This issue was created automatically by a script.
Bug 1713496
Bug Reporter: @MikkCZ
CC: @Pike
STR:
-- press acute/caron key (with or without Shift), followed by e.g. E, to write either "é" or "ě"
-- press space bar
What should happen:
What happens:
The text was updated successfully, but these errors were encountered: