-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 is deleted when undoing a hard break inserted into a heading #11108
Comments
I was able to reproduce this. It seems to only happen with headings. With text blocks, using command+z will revert the action of the broken line (2 blocks created) without deleting the text. |
I just tested this behavior in a list and found something very similar. In that case it deleted both list items: This feels related-ish to #11165. Win 10, Firefox 63, WP 5.0-beta1-43832 |
Related: #8882 List block seems to restore correctly with a single Undo (likely because the return doesn't create a new block), however the cursor gets placed at the end of the line after an undo. |
Duplicate of #8882. |
Typing a hard return (Enter) in the middle of a heading, then using command+z to undo deletes everything that appeared after the line break:
Typing command+z a second time brings the text back.
Using the backspace key instead of command+z undos the line break in the way I'd expect.
I would expect that typing command-z at this stage would just undo the line break I'd inserted, rather than removing the second paragraph entirely. I'm not certain if this is a bug or expected behaviour—I suspect on a technical level, it's undoing the "create new block" first and then the "break heading", but from a ux perspective, it feels unexpected.
To reproduce:
command+z
.command+z
again to bring the deleted text back.The text was updated successfully, but these errors were encountered: