Skip to content

Commit

Permalink
fix block selection
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Nov 7, 2024
1 parent 2d676d4 commit 0b9be46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-coins-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-selection': patch
---

Fix: clicking the left or right padding of the editor did not deselect.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const blockSelectionPlugins = [
scrolling: {
speedDivider: 1.5,
},
startThreshold: 10,
startThreshold: 4,
},
boundaries: '#scroll_container',
container: '#scroll_container',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const onChangeBlockSelection: OnChange<BlockSelectionConfig> = ({
}) => {
if (
editor.selection &&
getOptions().isSelecting &&
getOptions().selectedIds!.size > 0 &&
!editor.getOption(BlockMenuPlugin, 'openId')
) {
api.blockSelection.unselect();
Expand Down

0 comments on commit 0b9be46

Please sign in to comment.