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

Comments

Projects
None yet
1 participant
@Ascrod
Copy link
Owner

commented Dec 7, 2017

@Ascrod Ascrod added the bug label Dec 7, 2017

@Ascrod Ascrod self-assigned this Dec 7, 2017

@Ascrod

This comment has been minimized.

Copy link
Owner Author

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

This comment has been minimized.

Copy link
Owner Author

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

This comment has been minimized.

Copy link
Owner Author

commented Jan 13, 2018

Resolved with 0667ae4.

@Ascrod Ascrod closed this Jan 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.