Skip to content

Commit 77c3737

Browse files
committed
PDF: Hide Read Aloud jump button on pointerleave
1 parent 6350493 commit 77c3737

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/pdf/pdf-view.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ class PDFView {
309309
this._iframeWindow.addEventListener('copy', this._handleCopy.bind(this), true);
310310
this._iframeWindow.addEventListener('input', this._handleInput.bind(this));
311311

312+
this._iframeWindow.document.body.addEventListener('pointerleave', this._handlePointerLeave.bind(this));
313+
312314
this._dragCanvas = this._iframeWindow.document.createElement('canvas');
313315
this._dragCanvas.style.position = 'absolute';
314316
this._dragCanvas.style.left = '-100%';
@@ -4070,6 +4072,10 @@ class PDFView {
40704072
}
40714073
}
40724074

4075+
_handlePointerLeave() {
4076+
this._readAloudJumpButton.hide();
4077+
}
4078+
40734079
getDragMultiIcon() {
40744080
let canvas = this._dragCanvas;
40754081

0 commit comments

Comments
 (0)