-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Chrome 112 crashes editor after presence of tab in content #5390
Comments
Observed that this issue only happens when typing a-zA-z or space. That led me to this line: https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/editable.tsx#L496 There's a check in Slate to support React's native vs. non-native event handling for beforeInput events, e.g. facebook/react#11211 If I change https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/editable.tsx#L502 to native = false for Chrome, works around this issue, but it's unclear why. It's as if the native event is getting treated as a long-press event. So I would feel much better if I knew what caused this regression for Slate in Chrome 112 (intentional or not) |
I have faced the same issue and the regression came from production and from a customer. I also want to know the root cause for this regression. But is there any short way to solve this on developer side for now? @dylans |
Short term fix is something along the lines of "change https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/editable.tsx#L502 to native = false" There is some update from the Chrome team, so they are looking into it and know roughly what change to Chromium caused the regression: https://bugs.chromium.org/p/chromium/issues/detail?id=1431935#c7 |
Fix has landed in Chrome. Unclear exactly when it will land, but it looks like in both a patch release of 112 and in 113. |
Hi everyone. Thanks for all the hard work reproducing and investigating so far. This issue was helpful to me, as was the link to the Chromium issue. I just tested in Chrome 112 and 113 and neither seems to have fixed the issue. However, Chrome 114 has indeed fixed the issue. Here's a screencast of my testing, in case this is valuable to anyone. As I understand it, there's chance that 112 or 113 will get the fix in a patch release, but that doesn't seem to have happened yet, and whether that is to happen or not seems unresolved in the Chromium issue. Would you consider making a patch to the Slate library for the time being? If I understand correctly, @dylans "short-term fix" requires us forking Slate, correct? |
Description
A clear and concise description of what the bug is.
Cross-reported at https://bugs.chromium.org/p/chromium/issues/detail?id=1431935
Steps
To reproduce the behavior:
Expectation
No duplication of text characters or inconsistency between Slate state and DOM
Environment
The text was updated successfully, but these errors were encountered: