Closed Bug 786674 Opened 12 years ago Closed 5 years ago

Zoom commands not sent to pdf viewer if pdf viewer doesn't have focus (focus in locationbar)

Categories

(Firefox :: PDF Viewer, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: st3fan, Assigned: Snuffleupagus)

References

(Regressed 1 open bug)

Details

(Whiteboard: [pdfjs-c-feature])

Attachments

(5 files, 2 obsolete files)

Attached image Screenshot
See attachment. Preview.app on the left, Firefox Nightly 18 on the right.

Not sure if this is PDF specific. The PDF can be found at

http://media.pragprog.com/titles/dsproc/gestures.pdf
Oh I just realized that I actually hit Command Plus and Command Minus to zoom.

When I use the +/- buttons in the viewer, things are a lot better.

So maybe the real issue here is that those keyboard commands change the browser's viewport and not the PDF zoom factor?
Windows doesn't seem to be affected by this, so its limited to Mac.
Windows however seems to cut letter width.
Ah, so this bug is actually also on windows, however to replicate it, do the following:
1. Open pdf.
2. Click on location bar or search bar.
3. (on windows) ctrl+plus to zoom.

Seems the zoom commands are not getting sent to the pdfviewer
Summary: Zooming in leads to blurry text and graphics → Zoom commands not sent to pdf viewer if pdf viewer doesn't have focus (focus in locationbar)
Comment on attachment 656456 [details]
Windows version not showing blur but cut letters

screenshot not actually covering the bug
Attachment #656456 - Attachment is obsolete: true
Zooming with the keyboard should be working.  I know the zoom from the menu bar doesn't work though.
Whiteboard: [pdfjs-c-feature]
(In reply to Brendan Dahl from comment #5)
> Zooming with the keyboard should be working.  I know the zoom from the menu
> bar doesn't work though.

Hmm. For me both the command keys (+/-) and the menu options (View -> Zoom -> Zoom In/Out) have the same effect: the browser content is zoomed, not the PDF page.

This is on today's Nightly.
Hm something changed.

Command-Plus still has the same wrong behaviour: it zooms the whole UI of the PDF viewer, including the top bar with the PDF viewer buttons, etc.

What is new is that Command-Minus stopped working. It simply does not do anything anymore.

Not sure if that was due to an attempt to fix this bug but reporting anyway.
Incarnation of this Bug is still present in FF19.

[CMD]+[+]   --> Complete UI Zooms, PDF stays the same size (relative to the UI zoom)
[CMD]+[-]   --> PDF Zooms out, this is expected expected behaviour for [CMD]+[+] too.

I think, the UI Zoom Eventhandler needs to be disabled for Zoom Shortcuts in PDFs
@Alex This is exactly what happens. And only possibility to reset the zoom level of the complete UI is to hit View -> Zoom -> Normal. Even [Cmd]+[0] (which should do the same) has no effect. But I guess it won't be difficult to fix.
A further symptom (I think) of this bug is that text selections in the document use the (different) zoom of the toolbar rather than that of the text. I.e. the text selection box is way bigger than the text selected in the example shown in the new attachment.
OS: Mac OS X → All
Hardware: x86 → All
Version: 18 Branch → Trunk
I was gonna report this bug, but since it already exists, I'm posting a clear representation of this bug on Windows (and also sending auto-email to those who may have time to fix it)
At first the focus was on UI (urlbar), I pressed Ctrl+[+/-].
Then I focused pdf itself and pressed Ctrl+[+/-] again.
See Also: → 1158610
Attached patch bug786674.patch (obsolete) — Splinter Review
Assignee: nobody → jonas.jenwald
Status: NEW → ASSIGNED
Attachment #9052217 - Attachment is obsolete: true
Attached patch zoom_test.patchSplinter Review

Here's a test we can use. It also looks like the phabricator review needs to be updated after the js formatting changes.

Flags: needinfo?(jonas.jenwald)

(In reply to Brendan Dahl [:bdahl] from comment #19)

Created attachment 9077190 [details] [diff] [review]
zoom_test.patch

Here's a test we can use. It also looks like the phabricator review needs to be updated after the js formatting changes.

Thanks a lot for your help with the test :-)

I've pushed an updated and rebased patch to Phabricator, so hopefully everything should be good now.

Flags: needinfo?(jonas.jenwald)
Keywords: checkin-needed

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/f5c7c5cd504a
Forward browser chrome zoom events to the PDF.js viewer. r=bdahl,Gijs

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Regressions: 1595064
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: