You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable FreeText editing. (Note that Ink editing is similarly affected.)
Click on any page, and add a new comment (e.g. "Hello world").
Open the web-console, and run PDFViewerApplication.close().
What is the expected behavior? (add screenshot)
Closing works correctly.
What went wrong? (add screenshot)
An error is thrown:
Uncaught (in promise) TypeError: editor.destroy is not a function
destroy http://localhost:8888/src/display/editor/tools.js:439
setDocument http://localhost:8888/web/base_viewer.js:644
close http://localhost:8888/web/app.js:866
async* debugger eval code:1
Basically, the issue is that none of the AnnotationEditor-classes implement a destroy-method. The simplest solution would be to just remove this code:
Another solution would be to actually implement destroy-functionality for the AnnotationEditor-classes, but I'm not sure if that's actually necessary here (given that we're tearing down the current Editing-instance)?
/cc @calixteman What solution is "correct" here? If it's the first one I could definitely submit a PR to fix it.
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): N/A
The text was updated successfully, but these errors were encountered:
Attach (recommended) or Link to PDF file here: N/A
Configuration:
Steps to reproduce the problem:
gulp server
, http://localhost:8888/web/viewer.htmlPDFViewerApplication.close()
.What is the expected behavior? (add screenshot)
Closing works correctly.
What went wrong? (add screenshot)
An error is thrown:
Basically, the issue is that none of the
AnnotationEditor
-classes implement adestroy
-method. The simplest solution would be to just remove this code:pdf.js/src/display/editor/tools.js
Lines 438 to 440 in b0a3c9e
Another solution would be to actually implement destroy-functionality for the
AnnotationEditor
-classes, but I'm not sure if that's actually necessary here (given that we're tearing down the current Editing-instance)?/cc @calixteman What solution is "correct" here? If it's the first one I could definitely submit a PR to fix it.
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): N/A
The text was updated successfully, but these errors were encountered: