Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L82, removeAllRanges was added here in #42340. I tried testing to make sure this doesn’t regress that issue but I'm not certain I correctly understood the testing instructions.

Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ export default function useMultiSelection() {
node.contentEditable = true;

// For some browsers, like Safari, it is important that focus
// happens BEFORE selection removal.
// happens BEFORE updating the selection.
node.focus();

defaultView.getSelection().removeAllRanges();
defaultView.getSelection().setPosition( node );
},
[
hasMultiSelection,
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removalAllRanges was added in #42711 and I didn’t see mention of what necessitated it. I suppose all of the List block features could use testing? I haven’t found any issues so far.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function useSelectAll() {
if ( rootClientId ) {
node.ownerDocument.defaultView
.getSelection()
.removeAllRanges();
.setPosition( node );
selectBlock( rootClientId );
}
return;
Expand Down