Skip to content
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

fix: properly handle visible whitespaces in empty blocks #2881

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

idebenone
Copy link
Member

Problem

Improper handling of visible whitespaces causing unwanted behaviour such as:

  • unable to delete trailing whitespaces in empty blocks.
  • caret jumping to the end of placeholder in paragraph block.

Solution

Update the isNodeEmpty() to handle visible whitespaces by removing the method call trim() in nodeText.trim().length as it would remove the trailing whitespaces if any exist which in turn falsely marks a block as empty. And because of this the whitespaces are unable to be removed.

@idebenone idebenone merged commit 931ed20 into v-2-30-6 Dec 3, 2024
4 checks passed
@idebenone idebenone deleted the fix/whitespace-bug-2.30 branch December 3, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants