Skip to content

Conversation

@untemps
Copy link
Owner

@untemps untemps commented Jul 3, 2022

This PR fixes an issue with the management of the focus : when the tooltip contained interactive elements, triggering events on them might be consider as target focus-out. As there is a callback attached to it, it was called and closed the tooltip.
We now check whether the event target is not an element within the tooltip before executing the content of the focus-out callback.

Closes #40

@untemps untemps added the bug Something isn't working label Jul 3, 2022
@untemps untemps self-assigned this Jul 3, 2022
@untemps untemps linked an issue Jul 3, 2022 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Jul 3, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svelte-use-tooltip ✅ Ready (Inspect) Visit Preview Jul 3, 2022 at 4:47PM (UTC)

@untemps untemps merged commit 3f92ca5 into main Jul 5, 2022
@untemps untemps deleted the fix/#40 branch July 5, 2022 05:54
github-actions bot pushed a commit that referenced this pull request Jul 5, 2022
## [2.7.1](v2.7.0...v2.7.1) (2022-07-05)

### Bug Fixes

* Fix tooltip focus management ([#41](#41)) ([3f92ca5](3f92ca5))
@untemps
Copy link
Owner Author

untemps commented Jul 5, 2022

🎉 This PR is included in version 2.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix closeOnCallback set to false

2 participants