Skip to content

Commit

Permalink
Writing flow: fix partial selection when dragging in between blocks (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored and ockham committed Sep 19, 2022
1 parent 964827e commit 6e21833
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/rich-text/src/component/use-input-and-selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,7 @@ export function useInputAndSelection( props ) {
const { start, end: offset = start } = createRecord();
record.current.activeFormats = EMPTY_ACTIVE_FORMATS;
onSelectionChange( offset );
} else if (
element.contains( focusNode ) &&
element !== focusNode
) {
} else if ( element.contains( focusNode ) ) {
const { start, end: offset = start } = createRecord();
record.current.activeFormats = EMPTY_ACTIVE_FORMATS;
onSelectionChange( undefined, offset );
Expand Down

0 comments on commit 6e21833

Please sign in to comment.