Skip to content

Ensure that currentOutlineButton enabling/disabling won't depend on the exact timing of the "pagesloaded" event (PR 13212 follow-up) #13220

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

Conversation

Snuffleupagus
Copy link
Collaborator

I (unsurprisingly) managed to forget about handling the case where a "pagesloaded" event arrives before the outline has been parsed, in which case we'd not actually enable the currentOutlineButton as intended.
Also, in the "pagesloaded" event handler, we should ensure that there's actually any pages loaded since otherwise the "find current outlineItem"-feature doesn't make any sense.

… the exact timing of the "pagesloaded" event (PR 13212 follow-up)

I (unsurprisingly) managed to forget about handling the case where a "pagesloaded" event arrives *before* the outline has been parsed, in which case we'd not actually enable the `currentOutlineButton` as intended.
Also, in the "pagesloaded" event handler, we should ensure that there's actually any pages loaded since otherwise the "find current outlineItem"-feature doesn't make any sense.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/f0286187051faf4/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/f0286187051faf4/output.txt

Total script time: 4.44 mins

Published

@timvandermeij timvandermeij merged commit daf4cd0 into mozilla:master Apr 11, 2021
@timvandermeij
Copy link
Contributor

Thanks for the follow-up!

@Snuffleupagus Snuffleupagus deleted the currentOutlineItemPromise-isPagesLoaded branch April 11, 2021 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants