Skip to content

Issue #6805 sloved, with additional bug fixes. #6943

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ManojaD2004
Copy link

@ManojaD2004 ManojaD2004 commented Apr 6, 2025

Fixed open issue #6805 (reopened after #6814)

Additional bugs that I faced:

  1. When the cursor is at the beginning of the slate text editor and the 'backspace' key is pressed, it would append the content of the previous slate text block.
  2. When we were at the end of the slate text editor and the 'delete' key is pressed, it would append the content of the next slate text block.

Note:

We need to make sure the slate text editor is removed and focused on the previous slate text block only when it has no content in the current slate text editor.

Bug Fix:

  • To handle this weird behavior, I created a function and checked these two edge cases. This pull request has fixed the main bug mentioned in the open issue and also fixed the additional bugs mentioned above.

Test the bug:

  1. Add a new page.
  2. Add three slate blocks with some text in them.
  3. Be at the second slate block, make sure your cursor is at the beginning of the second slate block, and press 'backspace'. (Notice the weird behaviour.)
  4. Again, be at the second slate block, make sure your cursor is at the end of the second slate block, and press 'delete'.

Bug screenshot:
Screenshot 2025-03-07 193148
Screenshot 2025-03-07 193215

Caution

The Volto Team has suspended its review of new pull requests from first-time contributors until the release of Plone 7, which is preliminarily scheduled for the second quarter of 2026.
Read details.



If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.

Closes #6805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pressing backspace on paragraph with a previous block with bullets results in error
2 participants