PdfViewer: Disabling the form-field editor via toolbar items causes an exception when interacting with form fields
SergenN opened this issue · 7 comments
when you disable the annotation editor using the following settings:
<ejs-pdfviewer [toolbarSettings]="toolbarSettings" [contextMenuOption]="'None'" [enableBookmark]="false" [enableTextMarkupAnnotation]="false" [serviceUrl]="service"> </ejs-pdfviewer>
toolbarSettings: ToolbarSettingsModel = { toolbarItems: [ 'OpenOption', 'PageNavigationTool', 'MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', 'DownloadOption', 'UndoRedoTool' ] };
Clicking an form-field works fine the first time but after the second time the following exception occurs:
TypeError: undefined is not an object (evaluating 'this.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage')
Which appears to be happening here. This exception blocks the signature dialog to open when it has been closed for the first time.
Hovering over the buttons in the toolbar will result in the following exception:
TypeError: undefined is not an object (evaluating 'this.annotationToolbarModule.shapeToolbarElement.contains')
Which appears to be originating from here.
Hi,
| Query | Response |
|---|---|
| when you disable the annotation editor using the following settings: <ejs-pdfviewer [toolbarSettings]="toolbarSettings" [contextMenuOption]="'None'" [enableBookmark]="false" [enableTextMarkupAnnotation]="false" [serviceUrl]="service"> toolbarSettings: ToolbarSettingsModel = { toolbarItems: [ 'OpenOption', 'PageNavigationTool', 'MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', 'DownloadOption', 'UndoRedoTool' ] }; Clicking an form-field works fine the first time but after the second time the following exception occurs: TypeError: undefined is not an object (evaluating 'this.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage') Which appears to be happening here. This exception blocks the signature dialog to open when it has been closed for the first time. | We were able to reproduce the below script error with the given details. Kindly confirm if this is the issue you are reporting. https://www.syncfusion.com/downloads/support/directtrac/general/ze/console_error1198686873 Below is the sample we used at our end to replicate the issue. Sample: https://stackblitz.com/edit/angular-wf5rwu?file=app.component.ts Kindly share the modified sample and clear steps to replicate the issue if you are facing a different issue |
| Hovering over the buttons in the toolbar will result in the following exception: TypeError: undefined is not an object (evaluating 'this.annotationToolbarModule.shapeToolbarElement.contains') Which appears to be originating from here. | We were unable to replicate this issue with the below (same) sample. Sample: https://stackblitz.com/edit/angular-wf5rwu?file=app.component.ts Kindly share the modified sample and the replication video to reproduce the issue at our end so that we can provide a solution at the earliest. |
Regards,
Shamini
Hi Shamini,
The first error is correct.
The second error can be produced using the following notation:
toolbarSettings: any = { toolbarItems: [...]} The object needs to be defined and initiated. Otherwise the toolbar settings will not work.
https://stackblitz.com/edit/angular-wf5rwu-fdlh4s?file=app.component.ts
Thank you for looking into it!
Hi SergenN,
Thanks for sharing the sample that reproduces the issue. We will validate both the issues and update further details in two business days on February 28, 2022.
Regards,
Shamini
Hi,
| Query | Response |
|---|---|
| when you disable the annotation editor using the following settings: <ejs-pdfviewer [toolbarSettings]="toolbarSettings" [contextMenuOption]="'None'" [enableBookmark]="false" [enableTextMarkupAnnotation]="false" [serviceUrl]="service"> toolbarSettings: ToolbarSettingsModel = { toolbarItems: [ 'OpenOption', 'PageNavigationTool', 'MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', 'DownloadOption', 'UndoRedoTool' ] }; Clicking an form-field works fine the first time but after the second time the following exception occurs: TypeError: undefined is not an object (evaluating 'this.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage') Which appears to be happening here. This exception blocks the signature dialog to open when it has been closed for the first time. | We have validated the issue “Script error is thrown on clicking the form field for the second time” and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on March 22, 2022. You can track the status of the issue through the following link. Feedback: https://www.syncfusion.com/feedback/33061/script-error-is-thrown-on-clicking-the-form-field-for-the-second-time |
| Hovering over the buttons in the toolbar will result in the following exception: TypeError: undefined is not an object (evaluating 'this.annotationToolbarModule.shapeToolbarElement.contains') Which appears to be originating from here. | The reported issue has been fixed internally and was included in our latest weekly release v19.4.0.53. Kindly upgrade to that version to get the issue resolved. CDN: http://cdn.syncfusion.com/ej2/19.4.53/dist/ej2.min.js https://cdn.syncfusion.com/ej2/19.4.53/material.css |
Regards,
Shamini
Closing for housekeeping purposes. Further, the reported bug can be tracked through below feedback link further,
https://www.syncfusion.com/feedback/33061/script-error-is-thrown-on-clicking-the-form-field-for-the-second-time
Hi, i can't follow these issues they appear to be private?
Hi Sergen,
Sorry for the inconvenience. We have now made the feedback visible to you.
Regards,
Shamini