-
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
Placeholder text slow to re-appear after content has been cleared #5420
Comments
I'm seeing this as well. Tracked it down to Also causes some additional issues with my specific Slate editor inside a webview on native where the delayed placeholder after deletion causes the cursor to disappear then subsequent deletes break the editor. This was not the case before slate-react 0.92.0Simulator.Screen.Recording.-.iPhone.14.-.2023-05-18.at.15.53.19.mp4slate-react 0.93.0Simulator.Screen.Recording.-.iPhone.14.-.2023-05-18.at.15.50.26.mp4 |
Yeah, it's explicitly waiting 300 ms to show, which seems like an exceptionally long time for the purpose of allowing selections to settle. I wonder what the case is where that would take more than a couple milliseconds? |
@edhager do you have any thoughts on this one? About the placeholder delay |
I agree with the others, 300ms is way too long. It's visually distracting and It looks like a bug. Is it possible to remove this delay? |
+1 this is impacting our app |
Fixed for non-android devices with this PR available on slate-react@0.101.1 |
Description
Previously, clearing text would have the placeholder text appear again instantly. However, in 0.94.0 (and possibly 0.93.0) that placeholder takes some time to re-appear.
The placeholder works as expected in 0.92.0.
Recording
A GIF or video showing the issue happening. (If you don't include this, there's a very good chance your issue will be closed, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.)
Screen.Recording.2023-05-11.at.3.33.40.PM.mov
Sandbox
https://codesandbox.io/s/slate-reproductions-forked-bufv30?file=/index.js
Steps
This can also be replicated on the official examples: https://www.slatejs.org/examples/richtext
Expectation
I would have expected that the placeholder text to re-appear immediately after the text is cleared.
Video on slate-react on 0.92.0
Screen.Recording.2023-05-11.at.3.39.52.PM.mov
Environment
Context
Just updated to the latest version from 0.88.1 and noticed this immediately.
The text was updated successfully, but these errors were encountered: