Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Oct 21, 2024
1 parent dc72460 commit 0842bf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sweet-sloths-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-selection': patch
---

Fix: prevent scroll on block selection
2 changes: 1 addition & 1 deletion packages/selection/src/react/BlockSelectionPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const BlockSelectionAfterEditable: EditableSiblingComponent = () => {

React.useEffect(() => {
if (isSelecting && inputRef.current) {
inputRef.current.focus();
inputRef.current.focus({ preventScroll: true });
} else if (inputRef.current) {
inputRef.current.blur();
}
Expand Down

0 comments on commit 0842bf3

Please sign in to comment.