Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-hide for hover #3

Closed
devangnegandhi opened this issue Jul 24, 2011 · 5 comments
Closed

auto-hide for hover #3

devangnegandhi opened this issue Jul 24, 2011 · 5 comments

Comments

@devangnegandhi
Copy link

Hi,
I was wondering, why isn't there an auto-hide option for contextMenu triggered by hover?

@rodneyrehm
Copy link
Contributor

I'm not sure I understand what you want exactly. How should this auto-hide behave?

@devangnegandhi
Copy link
Author

what happens right now is when we mover over a div on which we want the context menu to appear on hover, the menu appears nicely. but, once we leave this area, the menu still stays there. It would have been nice if there was an option that would allow me to specify that a context menu should disappear once we moved out of that area. does this make sense?

@rodneyrehm
Copy link
Contributor

Well, yes, sort of.

Until I figure out how to do this properly, you could use the show event to register an mouseleave listener on your div. if triggered, and the relatedTarget is not the menu, send a hide event. (on hide event, unregister the listener…)

@devangnegandhi
Copy link
Author

ok thanks a lot.

rodneyrehm added a commit that referenced this issue Aug 8, 2011
@rodneyrehm
Copy link
Contributor

The solution is a bit hacky, as the mouse pointer position has to be compared to the position of the trigger element… but hey… it seems to work fine here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants