Safari - Pinch Zoom not working on krpano html popup - but wortks fine in any other webpage

  • Hi Guys

    So the html div block here:
    https://krpano.com/krpano.html?xm…side-krpano.xml

    Can be pinch zoomed just fine on Android. However, on iOS with Safari 13.6.1 (or any safari version really), I can't pinch zoom that same html div block. Why is that?

    Pinch Zoom works fine on any other site on iOS and Safari, but not on any of the html popup examples from KRPano.

    I suspect it has something to do with this code:


    After searching for hours. I found something that may be related. Somebody was asking why another page is not scrollable (nothing to do with KRpano), and the the answer was this:

    Code
    document.addEventListener('touchmove', function (event) {
      if (event.scale !== 1) { event.preventDefault(); }
    }, false);

    So then my question is, for Safari, with this 2nd block of code above if I just reverse the logic like so and it then stick it into the 1st block of code, would that work?

    Code
    document.addEventListener('touchmove', function (event) {
      if (event.scale !== 1) { event.preventDefault(); }
    }, true);
  • Hi,

    a pinch zoom would zoom the whole web-page, not just in the inner frame!
    Would you really want that?

    And the web-page-zooming is normally limited by the meta viewport settings in the outer html file, although some Android browsers are ignoring/override this per browser option.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!