Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Ascrod opened this issue Dec 7, 2017 · 3 comments
Assignees
Labels

Comments

@Ascrod
Copy link
Owner

Ascrod commented Dec 7, 2017

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

@Ascrod Ascrod added the bug label Dec 7, 2017
@Ascrod Ascrod self-assigned this Dec 7, 2017
@Ascrod
Copy link
Owner Author

Ascrod commented Dec 15, 2017

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

init() {
gBrowser.addEventListener("AboutReaderContentLoaded", this, false, true);
gBrowser.addEventListener("DOMContentLoaded", this, false);
gBrowser.addEventListener("pageshow", this, false);
gBrowser.addEventListener("pagehide", this, false);
},

@Ascrod
Copy link
Owner Author

Ascrod commented Dec 19, 2017

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
Copy link
Owner Author

Ascrod commented Jan 13, 2018

Resolved with 0667ae4.

@Ascrod Ascrod closed this as completed Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant