Fabric (canvas) on mobile devices while scrolling a page

I noticed that we cannot scroll the web page by reading our fingers on mobile devices where we used the Canvas associated with Fabric full screen.

The problem I am due to canvase is not allowing the page to scroll, how can I fix it.

url: http://dev-shree.com/sendfile/

check mobile browsing.

Is there any way to fix this.

my code to protect the site:

(function(global) {

    "use strict";
    var canvas = new fabric.Canvas('canvas',{selection : false,controlsAboveOverlay:true,centeredScaling:true});
    var overlayimageurl = $('#myimg').val();
    canvas.setOverlayImage(overlayimageurl, canvas.renderAll.bind(canvas));
    canvas.stateful = false;
+4
source share
1 answer

The canvas fabricjs class has a parameter allowTouchScrolling Indicates whether the browser can be scrolled when using a touchscreen and dragging on the canvas

var canvas = new fabric.Canvas('canvas',
    {
        selection : false,
        controlsAboveOverlay:true,
        centeredScaling:true,
        allowTouchScrolling: true
    }
);
+7
source

Source: https://habr.com/ru/post/1584753/


All Articles