From eedbf6dabd24d0e2dcfccc6b57b333c76843c578 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 12 Oct 2023 14:21:29 +0100 Subject: [PATCH] Fix Cmd/Ctrl-c doing quick copy instead of copying selected text --- src/common/focus-manager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/focus-manager.js b/src/common/focus-manager.js index f77fee5f..b58a9ab1 100644 --- a/src/common/focus-manager.js +++ b/src/common/focus-manager.js @@ -218,7 +218,11 @@ export class FocusManager { if (ids.length > 0) { let annotation = this._reader._state.annotations.find(x => x.id === ids[0]); if (!document.activeElement?.closest('.text, .comment') - || (!annotation.comment && this._reader._annotationSelectionTriggeredFromView)) { + || ( + document.activeElement?.closest('.comment') + && !annotation.comment + && this._reader._annotationSelectionTriggeredFromView + )) { this._reader._handleSetDataTransferAnnotations(event.clipboardData, annotation); event.preventDefault(); }