Skip to content

Commit

Permalink
Fix clicking or tapping to hide popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Oct 28, 2024
1 parent e6302a2 commit 797da23
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ext/js/language/text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,20 @@ export class TextScanner extends EventDispatcher {
return false;
}

switch (e.button) {
case 0: // Primary
this._scanTimerClear();
this._triggerClear('mousedown');
break;
case 1: // Middle
if (this._preventMiddleMouse) {
e.preventDefault();
e.stopPropagation();
return false;
}
break;
}

this._onMouseMove(e);
}

Expand Down

0 comments on commit 797da23

Please sign in to comment.