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

Web and WebWorks Development

Reply
Contributor
Posts: 19
Registered: ‎06-28-2010
My Device: n/a
My Carrier: n/a

Disable menu appearing on blank area click

Hi

 

I am developing a widget in Visual Studio. When I click in a blank area in my widget it brings up the menu. Is there any way to disable this? I only want the menu to appear when the menu button is clicked.

 

Thanks

Contributor
Posts: 19
Registered: ‎06-28-2010
My Device: n/a
My Carrier: n/a

Re: Disable menu appearing on blank area click

Anybody?

Contributor
Posts: 17
Registered: ‎06-28-2010
My Device: 8520

Re: Disable menu appearing on blank area click

I am searching for how to do this too - Especially in OS6 it is annoying as the menu pops up in the middle of the screen. It also pops up if you do a 'long' click for a couple of seconds.

 

Would be great if someone knows how to disable it

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Disable menu appearing on blank area click

I wasn't aware that this is happening on BB6... do you have an example of what you mean by touch and holding in a "blank area".

 

If it is BB6 you should be able to override any of this touch and hold with the touch events.. but I would like to know more on how to reproduce the scenario.  We disabled the context menus by default in PlayBook but I wasn't aware that these were showing up on BB6

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 17
Registered: ‎06-28-2010
My Device: 8520

Re: Disable menu appearing on blank area click

Tim,

 

I had a bit of a play around to isolate the issue. Seem that from the monent you add a menu item with addMenuItem, there seems to be some sort of listener on the page that pops up the full screen menu and also when you single click in an already focused input field. This is very annoying and I would be very grateful if someone could tell me how to disable this (I can't see how to disable it with touch events - If I return false on click of any area of the page, none of my links will work ?)

 

Example: Create a new empty webworks app with the below and blackberry.ui.menu feature included in config.xml

 

<html><head>
<script>var aMenuitem = new blackberry.ui.menu.MenuItem(false, 1, "Test menu item", null);
blackberry.ui.menu.addMenuItem(aMenuitem);
</script></head>
<body><input type=text></body></html>


 

Any 'long' click anywhere in the body or any single click in the input field if it's already highlighted will give you the below.

 

<html><head>
<script>var aMenuitem = new blackberry.ui.menu.MenuItem(false, 1, "Test menu item", null);
blackberry.ui.menu.addMenuItem(aMenuitem);
</script></head>
<body><input type=text></body></html>


9780.png

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Disable menu appearing on blank area click

Is this on a device with a touch interface (i.e. touch and hold)... or does it happen with the track pad?

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 17
Registered: ‎06-28-2010
My Device: 8520

Re: Disable menu appearing on blank area click

track pad ... And (ashamed of this as I didn't notice this before) it manifest too when you click in any non-onclick area on any webpage in the browser.