-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Unable to delete selected blocks using the keyboard #41416
Comments
likely related to #38892 I'm not quite sure what the disadvantage that you're experiencing is: On 5.x without Gutenberg installed: if your cursor was 3-4 lines in a 8 line block, shift + down would select each subsequent line of the block and when you came to the end of the block, it would select the entire block, and if you pressed shift+down once more, it would select all of the the adjacent block as shown in the following video 2022-05-27-gutenberg.mp4You could then press the delete or backspace button and all of the content in both blocks would be deleted. On 6.x without Gutenberg installed (which likely has #38892 included); I can still delete multiple, consecutive rich text-based blocks now; I just now start at the beginning of the first block. You can relatively quickly go to the beginning of that block's content by pressing the home button on the keyboard and then pressing up or down as you desire and continuing to press shift and down until selecting all of the second block's content; and then I was able to press delete to erase the block's content as indicated in the video below. (alternatively, you could reach the beginning of a block by pressing control + home, although that is likely unintended behavior - ref #8353) 2022-05-27-gutenberg-2-.2.mp4Does this behavior not match what you're experiencing? If it does, How would you suggest to improve this behavior? |
My end users have been describing comparable issues with the delete key. I'm still trying to corner what is the exact behavior causing problems. |
Thanks for the explanation, @skorasaurus. When I'm in a text-based block, using shift-up allows me to select text line-by-line. I can then use delete for the current block (not the current text selection) or backspace just for the current selection. Although this is different to previous versions, and requires users to experiment in order to find out the new behaviour, it seems to be logical. After selecting a columns block and then using shift+up to select as far as the middle of a preceding text block, using the delete button doesn't delete anything; it highlights/selects the whole of the columns and text block in which the cursor is currently positioned. This is incorrect - it should delete any completely selected blocks and the part of the text block which was highlighted. Partially selecting in this way outside the Gutenberg editor (e.g. in another OSX app) and then typing without deleting removes what was formerly selected, and allows for continued typing immediately. Using shift+down to select text in a text block stops at the end of the final text block. It is no longer possible to use the keyboard to start a selection in the middle of a text passage and then continue into the adjacent (e.g. image, columns) block, with the subsequent intention of deleting multiple blocks. Using the "home" button on the keyboard (OSX) moves me to the start of the current row within a text block, not to the beginning of the block. |
This would be the expected outcome except for the fact that now, with the integration of multiline selection, reaching the end of a text block should not automatically select the entire block. It should be possible to start the selection in the middle of a paragraph and continue into subsequent media/columns/etc. blocks using the keyboard. |
Thank you for the responses @markhowellsmead
Interesting, this behavior is different than it is for me; what happens for me (and what is the intended behavior - I think, not 100%) is that when a current text selection (and is highlighted) and then you press delete or backspace, only the current text selection is deleted. It sounds like for you, the entire block and all of its content, even if it is not selected and highlighted, is deleted. Do you have the same results when you press backspace as you do when you press delete? What operating system (and version) and web browser are you using? OSX?
I can reproduce this as well and is, to me, also unexpected behavior; I'll make a ticket for this shortly - #41467
(will finish this up later)
This is the same behavior for me on Linux; Using control + Home will move me to the beginning of the block. |
No, the result is different, as explained above.
Brave (Chromium) on OSX (12.4).
I'd say that the chances are slim for a regular user finding this out. The regular behaviour in OSX outside Gutenberg is that the home button jumps to the top of the page, so this modification in Gutenberg isn't an established interaction pattern. |
Excellent, this is (at least) one bug then! Could you share if you also experience this on chrome and firefox?
This is tricky because this pattern vary across operating systems: It is a common shortcut where in linux; Related bug for this #8353 |
After cross-checking all current browsers, including Safari, it seems that I was mistaken. Using the delete button or the backspace button only deletes text which has been selected. The other issues, including cross-boundary selection, remain. |
Does the cross-boundary selection you face is what I described in this other issue about the Classic block ? #41432 |
@Julianoe I expect it's related in some way. |
I am unable to reproduce this. I can delete blocks by pressing backspace and/or delete. This is probably related to #49217 |
I can't replicate this either. I'm going to close out for now but please let me know if the problem can be replicated and reopened. |
Description
Until WordPress 6.0, it was possible to delete selected blocks in the editor using the delete button / backspace button on the keyboard. This is no longer possible, thereby decreasing the usability of the keyboard for editor navigation.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.0 without Gutenberg plugin.
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
The text was updated successfully, but these errors were encountered: