Is there a way to catch the zoomed-out-max event in IE10 Metro?
-
29-10-2019 - |
Question
In Internet Explorer 10 Metro Style I want to catch the event that happens when the user zooms out to full view using pinch gesture.
I can do it either using JavaScript running in the page or a C++ code running in IE address space.
Solution
It's a hack but it's working, The extra minimum zoom is around 0.85 of the normal size so we check if the user zoomed out more than 0.87:
window.addEventListener ('resize', function () {
if (document.documentElement.clientHeight / window.innerHeight <= 0.87){
// this will run more than once while the user
// is zooming out close to the maximum level
}
}, false);
It won't work when zooming is disabled (mobile websites).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow