mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Stop sidebar resizing on "blur" events
Because of an old oversight (by me) we don't stop sidebar resizing when the browser window loses focus, which seems generally wrong and can also lead to duplicate mouse-related event listeners being registered.
This commit is contained in:
parent
984debaa9f
commit
7619171265
1 changed files with 2 additions and 0 deletions
|
@ -424,6 +424,7 @@ class PDFSidebar {
|
|||
|
||||
window.addEventListener("mousemove", this.#mouseMoveBound);
|
||||
window.addEventListener("mouseup", this.#mouseUpBound);
|
||||
window.addEventListener("blur", this.#mouseUpBound);
|
||||
});
|
||||
|
||||
eventBus._on("resize", evt => {
|
||||
|
@ -506,6 +507,7 @@ class PDFSidebar {
|
|||
|
||||
window.removeEventListener("mousemove", this.#mouseMoveBound);
|
||||
window.removeEventListener("mouseup", this.#mouseUpBound);
|
||||
window.removeEventListener("blur", this.#mouseUpBound);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue