From 6490c93133151a08f65cce16fd2b56152539d636 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 28 Jun 2020 14:13:39 -0400 Subject: re-fixed copy/paste from one text box to a new text box by moving clearSelection() from SelectDoc to setPreviewCursor. Otherwise, clicking on an unselected text box wouldn't set the insertion point. --- src/client/util/SelectionManager.ts | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/client/util') diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 0f204bba4..024532f90 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -12,17 +12,12 @@ export namespace SelectionManager { @observable IsDragging: boolean = false; SelectedDocuments: ObservableMap = new ObservableMap(); - clearSelection() { - if (window.getSelection) { window.getSelection()?.removeAllRanges(); } - else if (document.getSelection()) { document.getSelection()?.empty(); } - } @action SelectDoc(docView: DocumentView, ctrlPressed: boolean): void { // if doc is not in SelectedDocuments, add it if (!manager.SelectedDocuments.get(docView)) { if (!ctrlPressed) { this.DeselectAll(); - this.clearSelection(); } manager.SelectedDocuments.set(docView, true); -- cgit v1.2.3-70-g09d2