Tool.disableTextSelection() Not Working as Expected

WebViewer Version:1 0.9.0

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? Yes

Please give a brief summary of your issue:

I expect instance.Core.Tools.Tool.disableTextSelection() to disable text selection for the current tool. It doesn’t. I’ve tried using instance.Core.Tools.Tool.disableAutoSwitch() in conjunction with it, but it doesn’t work.

Instead, turning auto switch locks the tool into using the selection version that the mouse was last hovering over. If I was hovering over text, I can then only select text. If I was not, then I can only select areas.

Please describe your issue and provide steps to reproduce it:

  1. Hover your mouse over text while having a text selection tool active
  2. Run instance.Core.Tools.s.Tool.disableAutoSwitch(); instance.Core.Tools.Tool.disableTextSelection();
  3. Try to select non-text.

Please provide a link to a minimal sample where the issue is reproducible:

Hi there,

Thank you for reaching out to WebViewer forums,

I was able to reproduce the issue and it seems to only happen when the cursor is hovering over text. If the mouse icon switches to the ‘text cursor’ icon (The big I) and then disable the text selection, it will not work as intended.

The API will work as expected if you are not hovering over any text.

We will add this issue to the backlog for the product team to review. Please keep an eye out for the change-logs for when this fix does get added:

Best regards,
Kevin Kim

1 Like