Skip to content

Commit

Permalink
Eliminate extra click when opening context menus subsequently
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Jul 4, 2024
1 parent 3478b80 commit 2fd81be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pdf/pdf-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,9 @@ class PDFView {
let position = this.pointerEventToPosition(event);

if (this._options.platform !== 'web' && event.button === 2) {
// Clear pointer down because pointer up event won't be received in this iframe
// when opening a native context menu
this._pointerDownTriggered = false;
let br = this._iframe.getBoundingClientRect();
let selectableAnnotation;
if (position) {
Expand Down

0 comments on commit 2fd81be

Please sign in to comment.