Skip to content

Commit

Permalink
Fix Cmd/Ctrl-c doing quick copy instead of copying selected text
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 12, 2023
1 parent 3382837 commit eedbf6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/focus-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit eedbf6d

Please sign in to comment.