Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,211,026 members, 8,010,688 topics. Date: Saturday, 23 November 2024 at 04:52 AM |
Nairaland Forum / Science/Technology / Webmasters / How To Prevent Default Context Menu In Hybrid Apps On Blackberry (638 Views)
Video - How to Create A Sticky Navigation Menu In Wordpress Site (2 Methods) / How Can I Reset Blogger Template To Default / How To Upload Softwares And Apps On Your Blog For Download (2) (3) (4)
(1) (Reply)
How To Prevent Default Context Menu In Hybrid Apps On Blackberry by FincoApps(m): 1:05am On Sep 02, 2019 |
Hybrid applications are really nice because of the “code once, build all” philosophy. However, since Hybrid apps are actually web apps, they tend to show a context menu when a user tap and holds some elements like links, images or texts. Hybrid app developers would agree with me that this context menu is pretty ugly in apps, so it’s best to just remove them. Well since I’m a huge BlackBerry fan, I love to develop for BlackBerry and this context menu seems to be a really disturbing problem for me and a lot of other BlackBerry developers. This is because most of the solutions to remove this context menu works on all other devices but BlackBerry. So css solutions like: -webkit-touch-callout:none; -webkit-user-select:none; -webkit-tap-highlight-color: rgba(0,0,0,0); or Javascript solutions like: $(document).bind('contextmenu', function(e) { return false; }); document.oncontextmenu = function() { return false; } or even HTML solutions like: <body oncontextmenu="return false"> Do not work at all. Most of these solutions do work on Android, Windows and others, however, it never seems to work on BlackBerry10. A work around for this context menu issue on BlackBery10 is: Replace all <a> tags with something like the <span> tag. This way, the OS would not see this element as a link and not bother your users with a context menu on tap hold. Remove all <img> tags. Replace them with <div> tags and use css to set their background image instead. So this: <img src = "data/fincoa... Read more at https://fincoapps.com/how-to-prevent-default-context-menu-in-hybrid-apps-on-blackberry/ |
(1) (Reply)
Combo Web Design Promo (99% Discount) / We Offer Professional Web Design Services / Admob Click For Click
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |