mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #18586 from Snuffleupagus/editor-AbortSignal-any
[Editor] Remove event listeners with `AbortSignal.any()`
This commit is contained in:
commit
b7198d316f
9 changed files with 202 additions and 193 deletions
|
@ -538,7 +538,11 @@ const PDFViewerApplication = {
|
|||
}
|
||||
|
||||
if (appConfig.annotationEditorParams) {
|
||||
if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
|
||||
if (
|
||||
((typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
||||
typeof AbortSignal.any === "function") &&
|
||||
annotationEditorMode !== AnnotationEditorType.DISABLE
|
||||
) {
|
||||
const editorHighlightButton = appConfig.toolbar?.editorHighlightButton;
|
||||
if (editorHighlightButton && AppOptions.get("enableHighlightEditor")) {
|
||||
editorHighlightButton.hidden = false;
|
||||
|
|
|
@ -797,10 +797,8 @@ class PDFViewer {
|
|||
this.findController?.setDocument(null);
|
||||
this._scriptingManager?.setDocument(null);
|
||||
|
||||
if (this.#annotationEditorUIManager) {
|
||||
this.#annotationEditorUIManager.destroy();
|
||||
this.#annotationEditorUIManager = null;
|
||||
}
|
||||
this.#annotationEditorUIManager?.destroy();
|
||||
this.#annotationEditorUIManager = null;
|
||||
}
|
||||
|
||||
this.pdfDocument = pdfDocument;
|
||||
|
|
|
@ -623,7 +623,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
</div>
|
||||
</div>
|
||||
<button id="deleteModelButton" type="button" class="secondaryButton" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-settings-delete-model-button">Delete</span></button>
|
||||
<button id="downloadModelButton"type="button" class="secondaryButton" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-settings-download-model-button">Download</span></button>
|
||||
<button id="downloadModelButton" type="button" class="secondaryButton" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-settings-download-model-button">Download</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue