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

Quote Block: Deleting lines in a quote block leads to an error when selecting with keyboard #49217

Closed
artemiomorales opened this issue Mar 20, 2023 · 3 comments · Fixed by #49370
Assignees
Labels
[Block] Quote Affects the Quote Block [Package] Keyboard Shortcuts /packages/keyboard-shortcuts [Type] Bug An existing feature does not function as intended

Comments

@artemiomorales
Copy link
Contributor

artemiomorales commented Mar 20, 2023

Description

When selecting the contents of a quote block using the keyboard, then deleting, the block becomes invalid and fires an error.

Using Undo, one is not able to retrieve the lost content, though doing Redo immediately afterward will.

The same behavior is not present when selecting with a mouse; in that case, deletion of the Quote block contents is prevented.

Step-by-step reproduction instructions

  1. Add a new quote block
  2. Add to the quote block's main content and attribute
  3. Select part of the main content and attribution using the keyboard
  4. Delete the content

Screenshots, screen recording, code snippet

quote-block-bug.mp4

Environment info

  • WordPress 6.1.1, Gutenberg 15.4-rc1
  • Chrome 111.0.5563.64
  • Mac OSX 12.5

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@artemiomorales artemiomorales added [Type] Bug An existing feature does not function as intended [Block] Quote Affects the Quote Block labels Mar 20, 2023
@artemiomorales artemiomorales changed the title Quote Block: Deleting lines is a quote block leads to an error when selecting with kayboard Quote Block: Deleting lines is a quote block leads to an error when selecting with keyboard Mar 20, 2023
@artemiomorales artemiomorales changed the title Quote Block: Deleting lines is a quote block leads to an error when selecting with keyboard Quote Block: Deleting lines in a quote block leads to an error when selecting with keyboard Mar 20, 2023
@Thelmachido
Copy link

I can reproduce this but it is very fickle.

In some instances, the delete option on my keyboard wasn't working. Clicking on it wasn't removing anything, this might be related to this issue #49087

TT3 theme and TT1 theme

@Thelmachido Thelmachido added the [Package] Keyboard Shortcuts /packages/keyboard-shortcuts label Mar 21, 2023
@Mamaduka
Copy link
Member

I can reproduce the issue only when using the keyboard to select the text. Unfortunately, the error stack trace isn't very helpful.

@ellatrix
Copy link
Member

Interesting that pointer selection doesn't cause the same problem. Investigating now.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 27, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote Block [Package] Keyboard Shortcuts /packages/keyboard-shortcuts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants