-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Rich text: create undo level before autocorrect #45670
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
Conversation
|
|
dmsnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the duplicated comment before merging, but this looks good in a way where I feel like this would always be better to have an undo point before a correction was applied.
packages/block-editor/src/components/rich-text/use-insert-replacement-text.js
Show resolved
Hide resolved
|
Size Change: +20.4 kB (+2%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
What?
When e.g. Safari runs auto correct, create an undo level right before this happens to the user can revert the change.
Why?
How?
Testing Instructions
Easiest to reproduce in Safari:
Type "cant", which auto corrects to "can't" and undo immediately before the 1s timeout that creates an undo level.
Screenshots or screencast