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

Prevent documents from intermittently opening with the zoom level set to 1% (issue 6253) #6254

Merged
merged 2 commits into from
Jul 23, 2015
Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Please refer to the individual commit messages.

Fixes #6253.

… to 1% (issue 6253)

*This fixes a regression from PR 6192.*

Under some circumstances, the `resize` event handler in `viewer.js` is fired before the scale has been set. This can lead to PDF documents being rendered at the wrong zoom level when they are opened.
It seems that a way to reliably trigger this is to, using the Firefox addon, open a PDF file that triggers the `fallback` bar, in a new background tab (i.e. middle clicking on a link, or use the context menu).

Prior to PR 6192, we checked the selected option in the `scaleSelect` dropdown instead. Since `pageAutoOption` is selected by default in `viewer.html`, this should explain why the issue wasn't visible previously.
…er from `PDFViewerApplication.store` (i.e. `ViewHistory`)

Since the zoom value should be in percent, using `PDFViewer.currentScale` will be wrong by a factor of 100, potentially causing the zoom level of the document to become wrong on load.
@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/4f030c3d5a2098e/output.txt

timvandermeij added a commit that referenced this pull request Jul 23, 2015
Prevent documents from intermittently opening with the zoom level set to 1% (issue 6253)
@timvandermeij timvandermeij merged commit 2105346 into mozilla:master Jul 23, 2015
@timvandermeij
Copy link
Contributor

Thank you for the fix!

@Snuffleupagus Snuffleupagus deleted the issue-6253 branch July 23, 2015 13:47
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