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

Also update the browser history when the user *manually* change pages using the pageNumber-input (PR 12493 follow-up) #12559

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

This patch addresses a review comment, which pointed out that we should also handle the pageNumber-input, from PR #12493 (comment).

Given that a user manually changing pages using the pageNumber-input, on the toolbar, could be regarded as a pretty strong indication of user-intent w.r.t. navigation in the document, hence I suppose that updating the browser history in this case as well probably won't hurt.

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/1b56d669dce1e16/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://3.101.106.178:8877/df3fe667fb5c68f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/1b56d669dce1e16/output.txt

Total script time: 3.43 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/df3fe667fb5c68f/output.txt

Total script time: 4.90 mins

  • Unit Tests: Passed

…'s no active PDF document

All of these methods will, in one way or another, cause e.g. scrolling or zooming to occur and consequently they don't really make sense unless there's an active PDF document. Especially since all of these methods end up calling into a `BaseViewer`-instance, which already contains similar early returns in essentially all of it's methods and setters.
… using the pageNumber-input (PR 12493 follow-up)

This patch addresses a review comment, which pointed out that we should *also* handle the pageNumber-input, from PR 12493.

Given that a user *manually* changing pages using the pageNumber-input, on the toolbar, could be regarded as a pretty strong indication of user-intent w.r.t. navigation in the document, hence I suppose that updating the browser history in this case as well probably won't hurt.
Since we're now free to use e.g. optional chaining everywhere *except* for the worker, we can thus simplify this code a bit.
@Snuffleupagus Snuffleupagus marked this pull request as ready for review November 2, 2020 10:41
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2020

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/9cf4765ec7df9ea/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 3, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/9cf4765ec7df9ea/output.txt

Total script time: 4.07 mins

Published

@timvandermeij timvandermeij merged commit 4e13559 into mozilla:master Nov 3, 2020
@timvandermeij
Copy link
Contributor

Looks good; thanks!

@Snuffleupagus Snuffleupagus deleted the goToPage-labels branch November 4, 2020 09:21
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