mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #16786 from calixteman/editor_resizers_blur
[Editor] Stop the resize session when the window is blurred
This commit is contained in:
commit
be29a4dce5
1 changed files with 6 additions and 3 deletions
|
@ -464,15 +464,18 @@ class AnnotationEditor {
|
|||
this._uiManager.stopUndoAccumulation();
|
||||
this.div.draggable = savedDraggable;
|
||||
this.parent.div.classList.remove(resizingClassName);
|
||||
window.removeEventListener("pointerup", pointerUpCallback);
|
||||
window.removeEventListener("blur", pointerUpCallback);
|
||||
window.removeEventListener(
|
||||
"pointermove",
|
||||
boundResizerPointermove,
|
||||
pointerMoveOptions
|
||||
);
|
||||
};
|
||||
window.addEventListener("pointerup", pointerUpCallback, {
|
||||
once: true,
|
||||
});
|
||||
window.addEventListener("pointerup", pointerUpCallback);
|
||||
// If the user switch to another window (with alt+tab), then we end the
|
||||
// resize session.
|
||||
window.addEventListener("blur", pointerUpCallback);
|
||||
}
|
||||
|
||||
#resizerPointermove(name, event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue