Issue with scrolling in iOS 5 using -webkit-overflow-scrolling

无人久伴 提交于 2019-11-30 01:52:13

I had exactly the same issue. The problem turned out to be caused by two zero size iframes my site used to track history changes and load scripts. Removing these fixed the issue. I filed a bug with apple, waiting to hear back from them.

Check to see if you have any iframes on your page they could be the cause.

Armel Larcier

I have found a hacky solution but it needs javascript...

I stumbled upon that problem while loading scrollable nodes via ajax and appending them with js.

I found out that resetting the -webkit-overflow-scrolling property with js saved the day

JS CODE:

var myDiv = $('.myDiv');
myDiv.css('-webkit-overflow-scrolling','auto');
function fn(){
    myDiv.css('-webkit-overflow-scrolling','touch');
}
setTimeout(fn,500);

It really sucks that we have to call the setTimeout method but that's the only way I could think of...

EDIT : Watch out for display:none

Webkit overflow scrolling touch CSS bug on iPad

You need to put this css setting in your css file - the one you load using the content_css configuration variable:

body {
    -webkit-transform: translate3d(0, 0, 0);
}

The other option is to set the css directly from code on tinymce initialization:

$(tinymce.activeEditor.getBody()).css('-webkit-transform', translate3d(0, 0, 0));
lazd

I had the same problem in iOS 5.1.1 and it turned out to be due to an ::after pseudo-element with position: fixed that was on an element that contained the scrollable list exhibiting the "wrong scroll axis" behavior. Details here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!