ApryseSDK / webviewer-ui

WebViewer UI built in React
Other
402 stars 350 forks source link

[Bug] Marking for redaction throws an error #947

Closed creage closed 2 years ago

creage commented 2 years ago

WebViewer version: 8.2.0

The current behavior Trying to mark text for redaction using inline context menu throws an error in console

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'slice')

Steps to reproduce

  1. Go to https://www.pdftron.com/webviewer/demo/document-collaboration
  2. Hit F12 (launch developer tools, open Console)
  3. Using your mouse select any text, and then click on the "Mark for redaction" button. image
bollain commented 2 years ago

Hi @creage,

Thanks for the report - I was able to pinpoint the issue and a fix is being currently reviewed. It should be available this week.

This error should not affect the redaction workflow, it simply causes the annotation not to be added to the history manager, and as a result adding it can't be undone/redone.

In the future if you are submitting an issue and a ticket for freshdesk please add a reference to this so we can coordinate on our end; alternatively you can only submit a freshdesk ticket.

bollain commented 2 years ago

Hi @creage,

The fix is now merged in the 8.2 branch: https://github.com/PDFTron/webviewer-ui/commit/7053d9752d0b8c49ba858d711779f2295f23195f

The error should go away, and your annotation will be part of the history manager.

Let me know when you've had a chance to verify this on your end.

dredav commented 2 years ago

Thanks for fixing this isuse @bollain. I got the same one when calling annotationManager.exportAnnotations(). Is there a new 8.2.x release planned soon? Using the latest nightly build has solved the issue for me.

bollain commented 2 years ago

Hi @dredav, glad to hear this fix solved the issue for you.

As you already noticed, this has been merged into the stable nightly build, which is stable for production. We are currently working on the next release which will be 8.3. You can expect to see this beginning/middle of February.

If you have any further issues don't hesitate to reach out.

bollain commented 2 years ago

As this issue is now resolved in our nightly builds for 8.2, I will close this issue. https://www.pdftron.com/nightly/#stable/