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
Text input goes backwards after adding a soft break in Chrome #5611
Comments
I may possibly help with the fix or at least the verification of it, but at the moment am not familiar with any Slate implementation details so I don't even know where to start looking. |
I think this has something todo with the code editor.insertSoftBreak = () => {
editor.insertText("\n");
}; if you try to insert you can reference the code at in your case I think you should use |
Adding the zero-width space seems to help indeed. Thanks @mainhanu! Still this seems like bug to me, even tho the worksround is available. |
Description
When using Chrome, soft breaks (line feed characters) and formatting such as bold, the editor goes to a mode where the characters you type actually appear in reverse order.
Recording
Here you can see what happens when I press Shift+Enter in a certain position and start typing. All backwards!
slate-bug.mov
Sandbox
https://codesandbox.io/p/sandbox/slate-chrome-bug-d4nzx4
Steps
To reproduce the behavior:
Expectation
Text should appear as you type it.
Environment
Context
The setup required for reproduction is pretty simple as you can see in the sandbox. If seems to require that you have line breaks (
\n
) characters in use and that you have some formatting at the end of a line.The text was updated successfully, but these errors were encountered: