Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Disable context menu

Is there a way to disable the context menu completely in cascades?

 

My app uses a WebView for it's main, fully custom UI and as an unwanted side effect it's currently possible for users to inadvertently pull up the right-hand context menu and the blue copy selector arrows. In my case this is completely unwanted. 

 

Is there a way to turn this off?

 

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 291
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: Disable context menu

You might be able to use a ContextMenuHandler to prevent this:

contextMenuHandler: ContextMenuHandler {
onPopulating: {
event.abort();
}
}
Developer
Posts: 135
Registered: ‎04-25-2009
My Device: Z30
My Carrier: AT&T

Re: Disable context menu

well that helped me, thanks! OP should mark as solution.
Developer
Posts: 147
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: Disable context menu

[ Edited ]

No not really...

I have a similar situation with TextArea.

I want to disable the right-hand menu that appears on user longpress event.

I cannot allow for text selection and copy/paste/share later on but still I must allow typing of the new text in TextArea.

 

Any clues, please?

New Contributor
Posts: 9
Registered: ‎08-29-2012
My Device: Z10 LE STL100-1/10.1.0.2354
My Carrier: Telkomsel

Re: Disable context menu

this answer solved my prob. 

New Contributor
Posts: 9
Registered: ‎08-29-2012
My Device: Z10 LE STL100-1/10.1.0.2354
My Carrier: Telkomsel

Re: Disable context menu

Hello. This contextmenuhandler is not work on 10.3.1 os. Its showing the menu now. At 10.3.0 still works. Any solution?
Developer
Posts: 16,838
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Disable context menu


HuiZone wrote:
Hello. This contextmenuhandler is not work on 10.3.1 os. Its showing the menu now. At 10.3.0 still works. Any solution?

please open your own post for your issue.

i use contextmenuhandler without any issues on 10.3.1

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter