Hello people,
I found what I think is a bug in the PDF Viewer javascript control. I'm using version 20.1.0.56.
The problem seems to be somewhat specific to the context and the type of PDF being viewed, because this happens when testing the PDF Viewer with de 'Mobile emulator' switch turned on in dev tools of Chrome. I didn't test it in a real mobile device yet.
The error happens here (see the 'mobile emulator' button is blue/activated):
The problem does NOT happen with any PDF file, but the ones that have some sort of restriction, as can be seen in this image:
It seems that PDF files with no restrictions at all avoid the code flow to the function that doesn't have reference of 'parentElement'. Also, viewing the PDF in desktop browser mode doesn't seem to fail either.
Please, can you confirm this?
Thanks in advance, regards!
Alex
Hi Alejandro,
We have tried to replicate the reported issue with multiple documents. But unable to replicate the reported issue on our end. We have shared the sample in which we have tried to reproduce the issue, please refer to the below link.
Sample: https://stackblitz.com/edit/yufjn2?file=index.ts
Web service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WEBSER~11864044006
However, the reported issue seems to the document specific. Could you please share the PDF document in which you have reproduced the issue? This will be helpful to investigate further and provide the solution at the earliest.
Regards,
Vasugi.
Hello Vasugi,
I'm attaching a sample PDF that has restriction, so you can check it at your end.
Thank you
Alex
Hi Alex,
Thanks for sharing the file. We will check and update the details tomorrow (May 26, 2022).
Regards,
Shamini
Hi Alex,
We were able to replicate the reported issue “TypeScript error: Cannot read properties of undefined (reading 'parentElement') is thrown on loading the specific document in mobile devices”. We will validate it and update further details in two business days on May 30, 2022.
Regards,
Shamini
Hi Alex,
We have validated the issue “TypeScript error: Cannot read properties of undefined (reading 'parentElement') is thrown on loading the specific document in mobile devices” and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on June 22, 2022. You can track the status of the issue through the following link.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Shamini
Hi Alex,
Sorry for the inconvenience. The fix was not included in our latest weekly NuGet release. However, we will include the fix in our upcoming weekly NuGet release without further delay on July 6, 2022.
Regards,
Shamini
Hi Alejandro,
Sorry for the inconvenience. The fix was not included in our latest weekly NuGet release. However, we will include the fix in our upcoming weekly NuGet release without further delay on July 13, 2022.
Regards,
CCM Karthik
Hi Alejandro,
We have fixed the reported issue and the fix for the reported issue was included in our latest weekly release v20.2.0.38. Kindly upgrade to that version to get the issue resolved.
Packages:
CDN: https://cdn.syncfusion.com/ej2/20.2.38/dist/ej2.min.js
https://cdn.syncfusion.com/ej2/20.2.38/material.css
Regards,
CCM Karthik
Hello!
I've tested the issue with the latest SF components, and the problem seems to be resolved.
Thank you very much!
Regards
Alex
Hi Alex,
Thank you for the response.
Regards,
CCM Karthik