]> _ Git - fluidbook-html5.git/commitdiff
#1471
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jun 2017 17:33:56 +0000 (19:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jun 2017 17:33:56 +0000 (19:33 +0200)
js/libs/fluidbook/fluidbook.touch.js

index ac1b824e8702941974f4b952c741ed5547c51cee..85a2d464fb61852fbb6d8f4330221bc06e4cca70 100644 (file)
@@ -17,12 +17,16 @@ FluidbookTouch.prototype = {
     init: function () {
         var $this = this;
 
-        // Disable native zoom
-        document.addEventListener('touchmove', function (event) {
-            if (event.scale !== 1) {
-                event.preventDefault();
-            }
-        }, false);
+        // Disable native zoom #1471
+        if (this.fluidbook.support.iOS) {
+            document.addEventListener('touchmove', function (event) {
+                event = event.originalEvent || event;
+                if (event.scale != undefined && event.scale !== 1) {
+                    event.preventDefault();
+                }
+            }, false);
+        }
+
 
         $(this.fluidbook).on('fluidbook.page.change.end', function () {
             $this.resetSlide();