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.

Cancel when mouse pointer is outside menu

See original GitHub issue

It happens repeatedly that users of my application choose a command from the menu when they actually want cancel the menu. From using other menus they expect releasing the mouse button outside the menu would cancel it. In contrast the Cytoscape menu still selects a command even if the mouse pointer is outside the menu.

Current behavior:

  • The blue highlight remains even if the mouse pointer is outside the menu (see screenshot)

Expected behavior:

  • The blue highlight disappears as soon as the mouse pointer is outside the menu (that is the mouse distance is > menuRadius + activePadding). Releasing the mouse button does not select any command and closes the menu.

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jricommented, Mar 1, 2021

@HEmile Canceling works perfect! 3.4.0 is great! 😄

1reaction
jricommented, Apr 27, 2020

I still have high demand for this improvement, but can’t implement it at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hide/close menu when mouse is clicked outside its focus
Otherwise, the menu will not disappear when the user clicks outside of the menu or the window that created the menu (if it...
Read more >
Moving the mouse: mouseover/out, mouseenter/leave
The mouseover event occurs when a mouse pointer comes over an element, and mouseout – when it leaves. These events are special, because...
Read more >
Should a dropdown list be closed when mouse leaves?
If the user opens the dropdown and makes a more generous mouse move (move away the cursor to read all the options) -...
Read more >
Element: mouseleave event - Web APIs | MDN
The mouseleave event is fired at an Element when the cursor of a pointing device (usually a mouse) is moved out of it....
Read more >
pointer-events | CSS-Tricks
The pointer-events property allows for control over how HTML elements respond to mouse/touch events – including CSS hover/active states, ...
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