fluid-project / uio-plus

UIO+: UI Options browser extension
https://chrome.google.com/webstore/detail/ui-options-plus-uio%20/okenndailhmikjjfcnmolpaefecbpaek
Other
2 stars 2 forks source link

The self voicing enactor throws error when using UIO+ with idrc site #42

Open cindyli opened 1 year ago

cindyli commented 1 year ago

Describe the bug

The self voicing enactor throws error when using UIO+ with idrc site.

To reproduce

Steps to reproduce the behavior:

  1. In the UIO+ source code, modify "uioPlus.enactor.selfVoicing" in enactors.js to remove the distributeOptions block that disables the page level reading in the self voicing component;
  2. In a terminal, run "npm run build". Install the built UIO+ in Chrome.
  3. In Chrome, open https://idrc.ocadu.ca/, turn on text-to-speech, click "play" button;
  4. In the browser console, this error is thrown:
    Uncaught DOMException: Failed to execute 'setStart' on 'Range': The offset 54 is larger than the node's length (0).
    at fluid.orator.domReader.highlight (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:379713)
    at invokeInvoker (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:97450)
    at fluid.event.invokeListener (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:152017)
    at togo (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:152433)
    at fluid.model.notifyExternal (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:145514)
    at fluid.concludeModelTransaction (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:146459)
    at fluid.event.firer.fire (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:128:25883)
    at Object.commit (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:165277)
    at that.fireChangeRequest (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:164353)
    at that.change (chrome-extension://ekjpcdffphimkhjlmloccennolakcomg/lib/infusion/dist/infusion-uio.js:137:161795)

Expected behavior

The error should not occur.

Additional context or notes

This issue is also filed against the infusion at https://issues.fluidproject.org/browse/FLUID-6761