iscroll icon indicating copy to clipboard operation
iscroll copied to clipboard

iOS 11.3 (Safari 11.1) Breaks & My Solution

Open jongmoon opened this issue 7 years ago • 1 comments

By updating iOS 11.3, iScroll is affected by a Safari 11.1 change. I think #1231 could be related with this updates.

It is passive mode policy.

https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_11_1.html#//apple_ref/doc/uid/TP40014305-CH14-SW2

You can find that

Updated root document touch event listeners to use passive mode improving scrolling performance and reducing crashes

If you use preventDefault option as true(it's default), you would not worry about it. it will work OK.

But If you use preventDefault option as false, you should check touchmove handler (which does e.preventDefault()) on root document have {passive:false} like following.

var myScroll = new IScroll('#wrapper', {
  preventDefault: false
}

// You should check touchmove handler have `passive:false`
document.addEventListener('touchmove', function (e) {e.preventDefault();}, {
  passive: false
});

Is there any solution?

bindToWrapper option is true, passive:false is not needed.

jongmoon avatar Apr 30 '18 11:04 jongmoon

Hi, thanks. Your solution did work in my case.Saves a lot of trouble and time.

Calinas avatar Jul 02 '18 09:07 Calinas