How to disable the default behavior of an Anchor in jQuery Mobile (iOS)

后端 未结 5 1332
悲哀的现实
悲哀的现实 2020-12-05 08:26

I am building an app for iPhone and iPad using PhoneGap and jQM


      
5条回答
  •  抹茶落季
    2020-12-05 09:24

    Have a look at the events fired by JQM here http://jquerymobile.com/demos/1.1.0/docs/api/events.html. You want to handle the "taphold" event.

    EDIT Soon after posting this I ended up seeing the same problem in my app! I found that adding this style, similar to what @chrisben suggested fixes it:

    body {
        -webkit-touch-callout: none !important;
    }
    

    I don't have any form elements on my app so I don't know about those but links and buttons all work perfectly fine with this style added.

提交回复
热议问题