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

Ensure that we don't reset the current page view if the user inputs an invalid page number (PR 7289 follow-up) #7485

Merged
merged 1 commit into from
Jul 17, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jul 14, 2016

After PR #7289, we'll now reset the current page view in cases where I don't think we should. To avoid this, this patch ensures that we'll not modify the position when the page number is out-of-bounds.

STR:

  1. Open http://mozilla.github.io/pdf.js/web/viewer.html#page=1&zoom=auto,-98,696
  2. Enter an invalid number, e.g. 1000, in the pageNumber input.

ER:
The current position in the document shouldn't change, since the page number wasn't valid.

AR:
The document resets to the top of page 1.

…n invalid page number (PR 7289 follow-up)

After PR 7289, we'll now reset the current page view in cases where I don't think we should. To avoid this, this patch ensures that we'll not modify the position when the page number is out-of-bounds.

**STR:**
1. Open http://mozilla.github.io/pdf.js/web/viewer.html#page=1&zoom=auto,-98,696
2. Enter an invalid number, e.g. `1000`, in the `pageNumber` input.

**ER:**
The current position in the document shouldn't change, since the page number wasn't valid.

**AR:**
The document resets to the top of the page `1`.
@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/9de18f57bcddff3/output.txt

@timvandermeij timvandermeij merged commit 0da97ad into mozilla:master Jul 17, 2016
@timvandermeij
Copy link
Contributor

Good fix, thanks!

@Snuffleupagus Snuffleupagus deleted the resetCurrentPageView branch July 17, 2016 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants