jquery.ui.touch.punch.js script is preventing input functionality on touch devices

前端 未结 9 1640
一个人的身影
一个人的身影 2021-02-01 06:38

It took me a little bit, but I figured out that I can\'t click on my inputs because of the touch.punch script I\'m using to enable jquery UI drag functionality on touch devices.

9条回答
  •  甜味超标
    2021-02-01 07:10

    To anyone who might wind up here with a similar situation using the very handy touch.punch hack, simply forcing the focus through on a click event will work just fine!

    $('.input').bind('click', function(){
        $(this).focus();
    });
    

提交回复
热议问题