02-05-2013 05:00 PM
Is there anyway to disable the context menu that pops up when you press and hold an image in Blackberry 10? Im using bbUi.js and was wondering if that is possible.
If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
02-06-2013 01:28 PM
This thread should help get you in the right direction. I believe that you're basically capturing the touch event, then preventDefault(); which stops the default behavior of said event from firing.
02-06-2013 02:58 PM
Im using bbUi.js so I have to load scripts externally. Also, Im using a table with Images and Im not sure exactly how to implement that coding you provided.
<table width="100%">
<tr>
<td><img src="images/n1.png" height="266px" width="204px" onclick="blackberry.system.setWallpaper('local:/// images/n1.png');"/></td>
<td><img src="images/n2.png" height="266px" width="204px" onclick="blackberry.system.setWallpaper('local:/// images/n2.png');"/></td>
<td><img src="images/n3.png" height="266px" width="204px" onclick="blackberry.system.setWallpaper('local:/// images/n3.png');"/></td>
</tr>
</table>
Thanks for your help
If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
02-07-2013 11:21 AM
You have 2 options to prevent it:
window.oncontextmenu = function (evt) {
evt.preventDefault();
}
OR
You will need to include local:///chrome/webworks.js in your app as well as the feature blackberry.ui.contextmenu adn then you can do the following:
blackberry.ui.contextmenu.enabled = false;