Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys #5744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to reproduce:
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.
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 (inviewer.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.