fix: Selection jumps when dragging and selection ends outside editor bounds
This commit is contained in:
@@ -131,6 +131,10 @@ export default function SelectionToolbar(props: Props) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.getSelection()?.isCollapsed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { dispatch } = view;
|
||||
dispatch(
|
||||
view.state.tr.setSelection(new TextSelection(view.state.doc.resolve(0)))
|
||||
|
||||
Reference in New Issue
Block a user