Skip to content

Commit 52fcaa1

Browse files
committed
feat(core): prevent move selection when selection is in left or right cursor when click up #WIK-5900 (#259)
1 parent aa2c453 commit 52fcaa1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/shy-weeks-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"slate-angular": patch
3+
---
4+
5+
prevent move selection when selection is in left or right cursor when click up

packages/src/components/editable/editable.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,12 @@ export class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChe
873873
return;
874874
}
875875

876-
if (startVoid && endVoid && Path.equals(startVoid[1], endVoid[1])) {
876+
if (
877+
startVoid &&
878+
endVoid &&
879+
Path.equals(startVoid[1], endVoid[1]) &&
880+
!(AngularEditor.isBlockCardLeftCursor(this.editor) || AngularEditor.isBlockCardRightCursor(this.editor))
881+
) {
877882
const range = Editor.range(this.editor, start);
878883
Transforms.select(this.editor, range);
879884
}

0 commit comments

Comments
 (0)