question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

contextMenu not callable

See original GitHub issue

Hi! Any way to make the <div ... onContextMenu={}> fire ? I’ve tried by use of userEvent.click(elem, {ctrlKey: true}) userEvent.click(elem, {button: 2}) to emulate the right-click on an element but that does not trigger the context menu.

Any advice on whether this is a enhancement or simply myself doing wrong

So far I’m using fireEvent but I’d love to convert to user-event for all my mocks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

javascript - jquery UI simple context menu, callable from button ...
I looked at Selectmenu and it's close, but it seems to want to always show the currently selected item, which is not quite...
Read more >
ContextMenu - Android Developers
Extension of Menu for context menus providing functionality to modify the header of the context menu. Context menus do not support item shortcuts...
Read more >
Scripting API: ContextMenu - Unity - Manual
The ContextMenu attribute allows you to add commands to the context menu. ... The function has to be non-static. using UnityEngine;
Read more >
ContextMenu (Java SE 9 & JDK 9 ) - Oracle Help Center
Callback function to be informed when an item contained within this ContextMenu has been activated. The current implementation informs all parent menus as...
Read more >
dhtmlxMenu as contextMenu attached to a layout's cell
I'm trying to attach a context menu to a layout's cell in order to have a callable context menu for the whole cell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found