joelpurra / talkie

Text-to-speech browser extension button. Select text on any web page, and have the computer read it out loud for you by simply clicking the Talkie button.
https://joelpurra.com/projects/talkie/
GNU General Public License v3.0
71 stars 18 forks source link

stops reading on address change #45

Open gitnew2018 opened 1 year ago

gitnew2018 commented 1 year ago

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

Text and language

System information

Additional information

...

joelpurra commented 1 year ago

@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.

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.