Setting document.body.style.zoom messes zoom mouse interaction
See original GitHub issueSetting document zoom level e.g.:
document.body.style.zoom = 0.8;
messes mouse interaction for zooming. Please check out: https://codepen.io/aykutkilic/pen/bGeZXYp
Other interaction like panning, translating axis, zoom all works normally
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
zoom - CSS: Cascading Style Sheets - MDN Web Docs
The non-standard zoom CSS property can be used to control the magnification level of an element. transform: scale() should be used instead ...
Read more >Selenium WebDriver zoom in/out page content - Stack Overflow
This will result in zooming in by 300% and will scroll to top. Chrome await driver.executeScript('document.body.style.zoom = "300%"');.
Read more >How do you zoom a page in Javascript? - Quora
There are many ways to do it,you have to write both ZoomIn and ZoomOut functions for it. below is the working code. function...
Read more >200: Scroll to Zoom - CSS-Tricks
I just happened to be looking at a neat little SVG warping tool that had a feature where my mouse scroll wheel (or...
Read more >Unable to click on object after browser resize zoom out
executeJavaScript("document.body.style.zoom='60%'", null). My advice: Stick to the default zoom level and don't alter the AUT from your test ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aykutkilic that’s a good point - I think we’re going to leave #5193 as it is just addressing
transform
, since it’s tricky to handle both attributes within the architecture of that PR. But there is another approach of determining the scaling empirically viagetBoundingClientRect
on test elements in the corners of the graph that should handlezoom
just as well astransform
. If anyone is interested in switching to that (and that “anyone” may be us eventually, but not right now) we’d certainly be open to it as a follow-up PR.Our apps do not face web and run in CEF.