MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: zooming PDF behaves strangely; never resets to original zoom and keeps zooming out further each time
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
Will try to get a minimal example if helpful, but I"m seeing weird zooming behaviors with PDFs.
When IsZoomControlEnabled is false, ctrl+scroll will scroll a window with a PDF. So when it's true, there seems to be a double zoom happening. (sort of)
In my case, the setting is true, and if I log the ZoomFactor in the ZoomFactorChanged event, and I zoom in and out several times (one time per zoom in and out), I get logs like this:
0.9309927360774818
1.1637409200968523
0.8728056900726392
1.091007112590799
0.8182553344430992
1.022819168053874
0.7671143760404056
0.9588929700505069
0.7191697275378801
0.8989621594223501
0.6742216195667626
0.8427770244584533
0.6320827683438399
0.7901034604297998
0.5925775953223499
0.7407219941529374
0.555541495614703
notice it keeps decreasing slightly each time
If I use the +/- buttons embedded in the PDF, I don't have this issue.
tested with this PDF: https://warnell.uga.edu/sites/default/files/inline-files/ieVeg.pdf
Additionally, just opening the window triggers a ZoomFactorChanged event (with a zoom factor of 0.93; the first line in the list above)
With a window to a non-PDF (google.com), I get more predictable results:
1.1
1
1.1
1
1.1
1
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
127.0.2651.105
SDK Version
1.0.2535.41
Framework
Winforms
Operating System
Windows 11
OS Version
22631.4037
Repro steps
window.open window to PDF (I actually have some custom handling of NewWindowRequestedHandler and create my own WinForm with a WebView2 control in it)
Ctrl+Scroll to zoom in and out
PDF never resets to original zoom level and keeps zooming out bit by bit
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the custom WinForms window created by NewWindowRequestedHandler, using the linked PDF and Ctrl+scroll. Log ZoomFactorChanged while comparing PDF behavior with google.com, and check whether opening the PDF triggers the initial event. Done means identifying why PDF zoom drifts instead of returning to its original level, with behavior verified against Edge.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100