From 48e794d496b732223025b7badfc18d41315fee3f Mon Sep 17 00:00:00 2001 From: Daniel Souza Date: Tue, 16 Jan 2024 12:19:51 -0300 Subject: [PATCH] fix: prevent resetting selection on scroll click while recording --- src/syncfusion/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/syncfusion/index.ts b/src/syncfusion/index.ts index 412a3fe..6ddcd6d 100644 --- a/src/syncfusion/index.ts +++ b/src/syncfusion/index.ts @@ -88,11 +88,12 @@ export class IaraSyncfusionAdapter this._editorContainer.element.addEventListener("mousedown", event => { if (event.button === 1) { - this._resetSelection = true; - this._cursorSelection = new IaraSyncfusionSelectionManager( - this._editorContainer.documentEditor - ); - event.preventDefault(); + if (!this._selectionManager) { + this._resetSelection = true; + this._cursorSelection = new IaraSyncfusionSelectionManager( + this._editorContainer.documentEditor + ); + } this._recognition.toggleRecording(); } });