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
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus
Accepted Solution

Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

Hi,

 

Although the click-n-hold feature to bring up the BlackBerry mini menu with the option to "Invite to download" is handy, in my particular app (at least in certain spots) it is definately not desired.

 

In my case, I have a "spinner" arrow, that the user can click once to increment, or click and hold to auto-increment at a speed faster than they can click.

 

It works by starting the auto increment "onmousedown" and continues to spin until "onmouseup" (e.g. user releases)

 

However on the BlackBerry device... a click and hold of about a second causes the mini menu to popup (blocking the view) and not triggering the mouseup event... thus the control spins uncontrolably.

 

Mini menu:

mini-menu.png

 

I'm just wondering if there is a setting to turn this off on a per element basis (e.g. a special attribute) or worst case scenario... a way to turn the feature off completely within my app (not a huge issue, as there is an option in the main app menu to invite a user)


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

Hi 

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

I wasn't doing this so far... but I'll certainly give that a try.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

Hmm, I tried the preventDefault() and stopPropagation()... neither worked...

 

Is there any chance there is a config.xml option to toggle this per application?


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

Hi 

 

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

I'll give that a go too... thanks!

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

Hi 

 

If you can't stop the event propogation through javascript you may be forced to do it through Java,

 

You can do this by overriding the navigationClick() method in the framework. You can find the corresponding class here.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Is it possible to disable the "long click" "Invite to download" mini menu in WebWorks?

I tried the blackberry.ui.menu.clearMenuItems(); https://bdsc.webapps.blackberry.com/html5/apis/blackberry.ui.menu.html#.clearMenuItems and it looks like it works just fine ;-)

 

Thanks everyone for your help!


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.