Skip to content

Commit

Permalink
truly clear selection
Browse files Browse the repository at this point in the history
the way I built this, selection was sticking around but "cleared".
Instead, we should clear it, which also makes sure that the
API method getSelection() returns nothing in this situtation as well.
  • Loading branch information
eluberoff committed Sep 18, 2024
1 parent 25ddee4 commit 6ba0678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/focusBlur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ class Controller_focusBlur extends Controller_exportText {
};

private handleTextareaFocusStatic = () => {
if (!this.cursor.selection || this.cursor.selection.isCleared()) {
if (!this.cursor.selection) {
this.cursor.controller.selectAll();
}
this.blurred = false;
};

private handleTextareaBlurStatic = () => {
this.cursor.selection?.clear();
this.cursor.clearSelection();
};

private handleWindowBlur = () => {
Expand Down

0 comments on commit 6ba0678

Please sign in to comment.