1

We use MethodDraw which is a fork of SVG-Edit. Ever since the last iOS update on the iPad or iPhone, the screen scrolls when you try to draw a line on the drawing canvas. When making a simple selection, the screen pans around making it unable to use. There is a bug report on MethodDraw already, but it sounds like MethodDraw is no longer being maintained and updated.

To reproduce, view this page with a iPad or iPhone running iOS 11.3 or later: http://editor.method.ac/ and try to use the pencil to draw a line - you will see the screen move and it's almost impossible to use the app.

Searching the web for a solution, I found a similar issue but I'm still not sure how to patch MethodDraw to fix it. See webkit.org: Bug 184250 - Unable to call event.preventDefault in dynamically added event listener

I believe it has something to do with dynamic event handlers.

4

1 回答 1

0

这是我们用来纠正问题的功能。我们在页面加载时调用此函数。

function handleAppleDevice(){
    var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
    if(iOS){
        $('body').css('position','fixed');
    }
}
于 2019-01-04T21:44:35.043 回答