最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Prevent link popups in phonegap - Stack Overflow

programmeradmin2浏览0评论

I am using the phonegap api, to create a native iPhone application. However when creating links between pages, if you hold down the links for a few seconds a popup es up asking you if you wish to open or copy the links. I was wondering how I could disable these popups from ing up, to make the application run more smoothly etc?

I am using the phonegap api, to create a native iPhone application. However when creating links between pages, if you hold down the links for a few seconds a popup es up asking you if you wish to open or copy the links. I was wondering how I could disable these popups from ing up, to make the application run more smoothly etc?

Share Improve this question asked Sep 28, 2011 at 18:55 Alex SaidaniAlex Saidani 1,3172 gold badges16 silver badges32 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

I know this is almost a year ago, but I thought I could share some thought.

the suggestion is a good one, but it doesn't quite work for me working with Cordova 2.2 and JQM 1.2. Tapping and holding on a button or a tab (actually a link, A element), the actionsheet still pops up from the bottom of the screen (of an iphone, let's say).

This is what that does it for me:

.yourclassname {
    -webkit-touch-callout: none;
}

You can disable it entirely, or only for links. Set it in the CSS for links:

.class_name {
    -webkit-user-select: text;  

} 

Or for everything:

.class_name {
    -webkit-user-select: none;
}
发布评论

评论列表(0)

  1. 暂无评论