Ascrod / readerview

Implementation of Firefox Reader View as an add-on for the Pale Moon web browser.
9 stars 3 forks source link

Reader View button does not update when readerable page is opened in background #15

Closed Ascrod closed 6 years ago

Ascrod commented 6 years ago

See also: https://forum.palemoon.org/viewtopic.php?p=129429#p129429

Ascrod commented 6 years ago

Still looking at this issue. It has to do with how page load events are listened to here:

https://github.com/Ascrod/readerview/blob/82fbda56c5d4f25324e0a3a8e575773529ac77c9/chrome/content/readerMain.js#L63-L68

Ascrod commented 6 years ago

The events mentioned above fire correctly, but the code for handling them (as well as the MozAfterPaint event) is faulty. The issue lies in the use of gBrowser and content with the assumption that the tab firing the events is the currently selected tab.

I think most of this can be resolved by using gBrowser.getBrowserForDocument with the target document passed in with the event.

Ascrod commented 6 years ago

Resolved with 0667ae43454fc2cf8a5c0703661c414b925f1af1.