We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 535a042 + eec1bea commit 649a03fCopy full SHA for 649a03f
src/display/editor/comment.js
@@ -39,12 +39,17 @@ class Comment {
39
if (!this.#editor._uiManager.hasCommentManager()) {
40
return null;
41
}
42
+
43
const comment = (this.#commentButton = document.createElement("button"));
44
comment.className = "comment";
45
comment.tabIndex = "0";
46
comment.setAttribute("data-l10n-id", "pdfjs-editor-edit-comment-button");
47
48
const signal = this.#editor._uiManager._signal;
49
+ if (!(signal instanceof AbortSignal) || signal.aborted) {
50
+ return comment;
51
+ }
52
53
comment.addEventListener("contextmenu", noContextMenu, { signal });
54
comment.addEventListener("pointerdown", event => event.stopPropagation(), {
55
signal,
0 commit comments