iScroll won't let items be clicked

前端 未结 9 2101
长情又很酷
长情又很酷 2021-02-07 05:41

I am using iScroll4 and it\'s working great!

This are the functions I use to init, refresh and end iScroll:

function iniciarIscroll(){
    /*En ie7 no lo         


        
9条回答
  •  情深已故
    2021-02-07 06:22

    You just need to make this changes in the loader of the iscroll:

    Change this line:

    myScroll = new iScroll('wrapper');
    

    For this:

    myScroll = new iScroll('wrapper', {
    useTransform: true,
    zoom: false,
    onBeforeScrollStart: function (e) {
    var target = e.target;
    while (target.nodeType != 1) target = target.parentNode;
    
    if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
    e.preventDefault();
    }
    });
    

提交回复
热议问题