-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Can't select all list items with Shift + up arrow without selecting previous block #12656
Comments
I've updated the original ticket description—this appears to only happen with 4 or more list items. In a list of 3 items, I'm able to select as expected. Also: Using CMD + Shift + Up arrow when the cursor is at the end of the last item does work as expected and selects all text at once. |
@jeremyfelt is this similar to #12322 ? Seems to me the same thing happens also on paragraphs, with the same caveat: it's triggered with 4 or more lines of text. |
@afercia It seems like it. I have the same issue with paragraphs. I can imagine it's the same area of code that's responsible. Should we close this one as a duplicate? |
Probably yes, I'd leave that to the Gutenteam though. For now, I'd remove the "Needs testing" label 🙂 |
Expect that the issue lies within the calculation of the vertical edge being traversed:
gutenberg/packages/dom/src/dom.js Lines 147 to 190 in e969954
I encounter a similar issue with lists. It's not clear to me whether it's precisely the same:
Expected: Caret moves to first list item |
I think this is alleviated by #14448, but it's still an issue only if the last item is |
@ellatrix Can you clarify? I can no longer reproduce this at all, regardless of whether the first line is longer than the last. |
@aduth Sorry, I meant: if the last line is longer than the first. :) |
I just tested this in WordPress 5.1 with the Gutenberg 5.4.0 plugin activated and I think it is resolved. I can select the full list of items using the keyboard when the last item is longer or shorter than the first. I had a similar issue with paragraphs and that is working now as well. |
I'm still able to reproduce with the same characteristics as in my previous comment #12656 (comment) . (macOS 10.15.1, Chrome 79.0.3945.88) |
Describe the bug
In WordPress 5.0, given a list of at least 4 items in a list block, if I try to select all of those items with CMD + Shift + Left arrow and then Shift + Up arrow, all of the items except for the first can be selected as expected. As soon as I type Shift + Up arrow for the last item, the selection skips and becomes a multi-block selection.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to select each list item in the block so that I can copy/cut or otherwise manipulate the text.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: