mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[Editor] Disable context menu on alt-text button and in the associated dialog
but keep it for the text area. Disable pointerdown on the alt-text button to disable dragging the editor when the button is clicked (especially when slightly moving the mouse between the down and the up).
This commit is contained in:
parent
85568bd6cc
commit
88f3ed7745
2 changed files with 7 additions and 0 deletions
|
@ -78,6 +78,11 @@ class AltTextManager {
|
|||
this.#container = container;
|
||||
|
||||
dialog.addEventListener("close", this.#close.bind(this));
|
||||
dialog.addEventListener("contextmenu", event => {
|
||||
if (event.target !== this.#textarea) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
cancelButton.addEventListener("click", this.#finish.bind(this));
|
||||
saveButton.addEventListener("click", this.#save.bind(this));
|
||||
optionDescription.addEventListener("change", this.#boundUpdateUIState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue