-
Notifications
You must be signed in to change notification settings - Fork 171
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
Delete existing empty spans when leaving text edit mode #4266
Conversation
Job #8320: Bundle Size — 62.7MiB (~+0.01%).
Metrics (2 changes)
Total size by type (1 change)
View job #8320 report View fix/delete-existing-empty-spans branch activity |
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.
I tried the try me link and something is very broken, the Enter acts like a delete button for divs that don't already contain text, and text insertion also immediately quits.
Bug aside, I think for non-new elements we should be more careful, and make sure it's a span and not a div and/or that it doesn't have dimensions, backgroundColor, etc. So in general, we want the feature to clean up invisible leftover, but do not cause a headache if you have something selected and you accidentally press Enter.
Updated - the behavior only triggers for span elements without styling nor event handlers! |
Fixes #4265
Problem:
When leaving text edit mode, new elements are deleted, but existing ones are kept.
Fix:
Update the behavior so it also removes existing empty elements if: