Touch event selection broken with css property zoom
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What’s the current behavior?
Touch drag and drop is broken with a zoom property applied to the body tag. Instead of coordinates being calculated properly, the offset is dramatic.
What’s the expected behavior?
Can be reproduced with:
@media (max-width: 980px)
body {
zoom: 200%;
height: auto;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Touch event selection broken with css property zoom #785
Touch drag and drop is broken with a zoom property applied to the body tag. Instead of coordinates being calculated properly, the offset...
Read more >touch-action - CSS-Tricks
The touch-action property in CSS gives you control over the effect of touchscreen interactions with an element, similar to the more ...
Read more >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 >Disable double-tap "zoom" option in browser on touch devices
CSS to disable double-tap zoom globally (on any element): ... You should set the css property touch-action to none as described in this...
Read more >Simple Click Events | Maps JavaScript API - Google Developers
This example demonstrates the use of event listeners. It. listens for the click event on a marker to zoom the map when the...
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
I don’t know what the general approach is to zoomed pages, but this sounds like a reasonable solution to me. I say go ahead and open a PR, and we’ll see what people have to say about it!
I have a solution, do you think its okay to make a pull request for this? Browser support should be fine, however it assumes that the zoom property is only set on the body tag. This might be an okay assumption.
in Selection.js, function getEventCoordinates: