Skip to content

Commit

Permalink
fix(core): should remove native dom selection when slate selection is…
Browse files Browse the repository at this point in the history
… null
  • Loading branch information
pubuzhixing8 committed Feb 17, 2022
1 parent f82d625 commit 4fa409c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-rice-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-angular": patch
---

remove native DOM selection when slate selection is null
2 changes: 2 additions & 0 deletions packages/src/components/editable/editable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ export class SlateEditableComponent implements OnInit, OnChanges, OnDestroy, Aft
newDomRange.endOffset
);
}
} else {
domSelection.removeAllRanges();
}

setTimeout(() => {
Expand Down

0 comments on commit 4fa409c

Please sign in to comment.