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

Content manually selected with a mouse or trackpad is not deleted when the backspace key is pressed #8268

Closed
LZL0 opened this issue Jul 28, 2018 · 4 comments
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Milestone

Comments

@LZL0
Copy link

LZL0 commented Jul 28, 2018

Describe the bug
If the whole content of the block is selected the content will not be deleted, but instead it will be placed into the previous block right after its content.

https://www.youtube.com/watch?v=uoQR1zY9Z84

Steps to reproduce the behavior:
Select the entire content of the block.
Hit the backspace key.
Disclaimer: The first time it works, but after that it starts to act this way.

P.S.: With Ctrl + A it is fine (although a bit buggy: #8269)

Gutenberg version 3.3
WordPress version 4.9.7

@LZL0 LZL0 changed the title If the whole content of the block is selected the content will not deleted If the whole content of the block is selected the content will not be deleted Jul 28, 2018
@designsimply
Copy link
Member

designsimply commented Jul 30, 2018

Nice find! Tested and confirmed that if you select text with a mouse or trackpad and then press delete the block is removed but the selected text is not deleted and is pulled in to the prior block. Tested with WordPress 4.9.7 and Gutenberg 3.3.0 using Firefox 61.0.1 on macOS 10.13.6. (50s)

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 30, 2018
@designsimply designsimply added this to the 3.4 milestone Jul 30, 2018
@designsimply designsimply changed the title If the whole content of the block is selected the content will not be deleted Content manually selected with a mouse or trackpad is not deleted when the backspace key is pressed Jul 30, 2018
@aduth aduth self-assigned this Jul 30, 2018
@designsimply designsimply added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable and removed [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 30, 2018
@ghost
Copy link

ghost commented Jul 31, 2018

Also is it possible to change text color in 'quotes block', 'list block' etc. When text selected with a mouse.

@designsimply
Copy link
Member

designsimply commented Jul 31, 2018

Closed #8320 (it's worth a read) and noting the steps to reproduce from that report as a similar enough scenario to combine these issues:

1. Write text in a paragraph
2. Set caret in text
3. Press ⌘A

Observe that pressing Delete does not do anything.

Also see the other scenarios outlined in #8320 (comment).

@aduth
Copy link
Member

aduth commented Aug 7, 2018

Fixed by #8651

@aduth aduth closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants