talkie icon indicating copy to clipboard operation
talkie copied to clipboard

stops reading on address change

Open gitnew2018 opened this issue 2 years ago • 1 comments

Please fill out the following to help us help you. Replace ... with your own values, where applicable.

Expected behavior

should read whole selected text

Actual behavior

stops when scrolling page

Steps to reproduce behavior

on some webpages for example nodeBB forums when i select some text right-click talkie icon to read and then scroll the page the address changes and the reading stops.

Website

  • Website the problem occurred on: nodeBB forums
  • If possible, include the full link: https://community.nodebb.org/topic/180/who-is-using-nodebb/2

Text and language

  • Which part of the website did you want spoken: ...
  • If possible, include the full text: ...
  • Language the text was expected to be spoken in: ...

System information

  • Your browser: tested in some chromium based
  • Your browser version: ...
  • Your operating system: win10
  • Your operating system version: ...

Additional information

...

gitnew2018 avatar Jul 17 '23 07:07 gitnew2018

@gitnew2018: Talkie deliberately stops speaking when the "speaking tab" is either closed or "updated" with a new URL. The latter usually means that the URL has changed because a link was clicked. If a website implements other logic for when to change the page URL, as you noticed, that will also stop Talkie.

Thank you for providing an example URL. Tested it in Chromium and Firefox; speech stops on scroll in Chromium but not in Firefox. Have not debugged to check exactly why, but it would guess the "tab updated" event and/or the "URL change" property is unused in Firefox.

Talkie's source code includes comments regarding introducing a user preference.

  • https://github.com/joelpurra/talkie/blob/v7.0.1/code/packages/browser-background/src/talkie-background.mts#L253-L271

Perhaps separate allow/disallow settings for tab close and URL change is a good idea. (It may require other changes, too, since the tab is currently always expected to be available.) This would be nice to have, and while I might implement it in the future I cannot at this time say if and when.

joelpurra avatar Sep 13 '23 15:09 joelpurra