This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How do I prevent a long press from bringing up the context menu when using a touch screen?

  • 2 پاسخ
  • 1 has this problem
  • 65 views
  • آخرین پاسخ توسّط JonEmagine

more options

Hello, I'm working for a web based POS software company. We normally run our software in Chrome, but use Firefox (v47.0.1, in Windows POS Ready 7, no Add-ons) at about 40 locations because it has solved some weird issues that have come up at those sites (Web Socket disconnect, elements stop showing up on 3rd party hosted pages, etc...). Just had this issue brought to my attention today, and I can't seem to figure out which config setting I need to change. When I press and hold on a menu item, it is bringing up the context menu. Normally our software will open a pop-up window so you could edit or 86 the menu item from this pop-up menu. If I am using a mouse, the behavior works the way it should (left click and hold opens the pop-up menu). I thought this had something to do with "ui.click_hold_context_menus", but I'm still having the same issue when changing the value on this setting.

Hello, I'm working for a web based POS software company. We normally run our software in Chrome, but use Firefox (v47.0.1, in Windows POS Ready 7, no Add-ons) at about 40 locations because it has solved some weird issues that have come up at those sites (Web Socket disconnect, elements stop showing up on 3rd party hosted pages, etc...). Just had this issue brought to my attention today, and I can't seem to figure out which config setting I need to change. When I press and hold on a menu item, it is bringing up the context menu. Normally our software will open a pop-up window so you could edit or 86 the menu item from this pop-up menu. If I am using a mouse, the behavior works the way it should (left click and hold opens the pop-up menu). I thought this had something to do with "ui.click_hold_context_menus", but I'm still having the same issue when changing the value on this setting.

Chosen solution

Hmm, by default, Firefox lets sites override the built-in context menu using the document.oncontextmenu/window.oncontextmenu event. That works with the mouse on desktop and with touch on Android. I don't have a desktop computer with touch to test, but I would expect that to work.

There is a preference to override that behavior so that Firefox's context menu always appears (often in front of the site's context menu): set "dom.event.contextmenu.enabled" to false. However, it seems unlikely you would have toggled that on your systems.

As far as I know, the "ui.click_hold_context_menus" preference is only for Mac users (to address something related to the single mouse button), so that could explain why it makes no difference to the behavior you're describing.

Read this answer in context 👍 0

All Replies (2)

more options

Chosen Solution

Hmm, by default, Firefox lets sites override the built-in context menu using the document.oncontextmenu/window.oncontextmenu event. That works with the mouse on desktop and with touch on Android. I don't have a desktop computer with touch to test, but I would expect that to work.

There is a preference to override that behavior so that Firefox's context menu always appears (often in front of the site's context menu): set "dom.event.contextmenu.enabled" to false. However, it seems unlikely you would have toggled that on your systems.

As far as I know, the "ui.click_hold_context_menus" preference is only for Mac users (to address something related to the single mouse button), so that could explain why it makes no difference to the behavior you're describing.

more options

Thanks for your suggestion, jscher2000! Is document.oncontextmenu/window.oncontextmenu event set in the site's code? Unfortunately I don't have access to the code, but can forward this suggestion to our programmers. After my post, I tried changing the value of "ui.click_hold_context_menus" to false, but no luck there either.