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.

Mousedown on context menu should not cause tree to lose focus

See original GitHub issue

I think this can be prevented by calling mouseDownEvent.preventDefault(), or by using -moz-user-focus: ignore on the context menu.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
julienwcommented, Oct 11, 2018

Native context menus don’t change the selected menu item in response to the tab key. They react to the up/down arrow keys. So if we add our own key handling for that, maybe we don’t have to manually switch focus after all.

But after selecting an option, it makes sense that the focus goes back to where it was. (I suppose here that we could open the menu using the keyboard, which isn’t possible at the moment).

@tanhengyeow because you already fixed a good first issue bug, it would be better if you could take a help wanted bug that’s not a good first issue, so that we keep the good first issue bugs for newcomers. You can find such issues with this link. Thanks for your understanding 😃

0reactions
julienwcommented, Mar 5, 2019

Thanks, I’ll check it out shortly, probably tomorrow. Sorry for the delay!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop button losing focus when contextmenu event fires
I've implemented this by creating a helper to handle detecting a longpress, when onMouseDown or onTouchStart is fired then it plays, when ...
Read more >
Element: contextmenu event - Web APIs | MDN
The contextmenu event fires when the user attempts to open a context menu. This event is typically triggered by clicking the right mouse ......
Read more >
Topic: Context menu VS "mousedown" / sciter
So intercepting Event.MOUSE_DOWN is not enough. If you need to handle context menu actiavation in script then you should define Event.
Read more >
How to: Create a custom context menu | WinForms Controls
How to: Create a custom context menu ... The empty area does not provide a predefined context menu. You can handle the tree...
Read more >
ag-Grid Reference: Grid Properties
In other words, double clicking a columns headers edge will not auto-size. ... Set this to true to stop cell editing when grid...
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