iScroll内部textarea滑动不了bug


把document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);改为
//阻止默认行为
    $(document).on("touchstart touchmove mousedown mousemove",function(event){
        var tag = $(event.target).parents()[0].tagName;
        var thistag = event.target.tagName;
        if ( tag != "A" && tag != "INPUT" && tag != "TEXTAREA" && tag != "SELECT" && thistag != "A" && thistag != "INPUT" && thistag != "TEXTAREA" && thistag != "SELECT"  )
        {
            event.preventDefault();
        }
    })

posted @ 2015-08-13 16:30  安雅然  阅读(482)  评论(0编辑  收藏  举报