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

Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys #5744

Merged
merged 1 commit into from
Feb 27, 2015
Merged

Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys #5744

merged 1 commit into from
Feb 27, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

Steps to reproduce:

  1. Open http://mozilla.github.io/pdf.js/web/viewer.html#zoom=125.

    Please note: the bug also exists if the user have manually set the zoom level to 125% (by selecting that value in the dropdown box), I just wanted to provide as simple as possible STR.
  2. Press Ctrl + 0.

Expected result:
The zoom level (in the dropdown box) is set to "Automatic".
Edit: Compare with http://107.22.172.223:8877/458bfe79a031b38/web/viewer.html#zoom=125.

Actual result:
Nothing happens.


This is a regression from commit 7af8748, and it is caused by the removal of this code.
In the current code we instead rely on the scalechange event to update the zoom box (in viewer.js), but since we return early in pdf_viewer.js#L341-L343 for this case (given "Automatic" zoom == 125%) we aren't dispatching the event.

@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/458bfe79a031b38/output.txt

@Snuffleupagus Snuffleupagus added this to the 2015 Q1 milestone Feb 19, 2015
yurydelendik added a commit that referenced this pull request Feb 27, 2015
Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys
@yurydelendik yurydelendik merged commit fac79ab into mozilla:master Feb 27, 2015
@yurydelendik
Copy link
Contributor

Thank you for the fix.

@Snuffleupagus Snuffleupagus deleted the reset-auto-zoom-regression branch February 27, 2015 14:38
speedplane pushed a commit to speedplane/pdf.js that referenced this pull request Mar 4, 2015
…gression

Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys
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