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

Feat: options.closeOnClickOutside to close tooltip on click outside #661

Merged
merged 1 commit into from Aug 13, 2018

Conversation

piglovesyou
Copy link

Fixes #300

@piglovesyou
Copy link
Author

I used mousedown of capture event phase, after the fashion of Google Closure Library, that I'm sort of a believer of ;)

It's ready to be reviewed.

@FezVrasta FezVrasta merged commit 4ac7ae0 into floating-ui:master Aug 13, 2018
@FezVrasta
Copy link
Member

Thanks!

@atomiks
Copy link
Collaborator

atomiks commented Aug 13, 2018

Doesn't this have a problem of creating a new document event listener for every single tooltip?

(In tippy there is a single global click listener that handles all clicks).

@piglovesyou
Copy link
Author

@atomiks Yes, you're right. To be more modest, it can addEventListener only on the tooltip gets opened and removeEventListener when it disappears, I guess.

@httnn
Copy link

httnn commented Oct 30, 2018

could we get a release with this?

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

Successfully merging this pull request may close these issues.

None yet

4 participants