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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detached tooltip #3677
Detached tooltip #3677
Conversation
Demo starting at https://vanilla-framework-3677.demos.haus |
3707f48
to
70ba2d1
Compare
trigger.addEventListener('mouseenter', function () { | ||
// remove this class on mouseenter, | ||
// rather than unnecessarily on mousemove | ||
tooltip.classList.remove('u-hide'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory tooltip may show up in unexpected place if mouseenter
is triggered, but mousemove
is not.
Not sure if it may happen, but showing and positioning should happen together.
I think moving removing the hide class name to mousemove
handler should work. Or on mouseenter it should also be positioned correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃憤 moved the setting of x and y coords to a separate function
Done
Added a detached tooltip example
Fixes https://github.com/canonical-web-and-design/vanilla-squad/issues/1000
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 馃巵
,Breaking Change 馃挘
,Bug 馃悰
,Documentation 馃摑
,Maintenance 馃敤
.package.json
should be updated relative to the most recent release, following semver convention: