fix(VTooltip): correct pointer-events selector for non-interactive tooltips#22726
Closed
Bingtagui404 wants to merge 1 commit intovuetifyjs:masterfrom
Closed
fix(VTooltip): correct pointer-events selector for non-interactive tooltips#22726Bingtagui404 wants to merge 1 commit intovuetifyjs:masterfrom
Bingtagui404 wants to merge 1 commit intovuetifyjs:masterfrom
Conversation
…oltips The :not(.v-tooltip--interactive) was incorrectly nested under .v-tooltip > .v-overlay__content, causing the & to resolve to .v-overlay__content instead of .v-tooltip. This produced a selector that never matched any DOM element, so pointer-events: none was never applied to non-interactive tooltips. Move the rule out of the nested block so that :not() targets the .v-tooltip root element, producing the correct selector: .v-tooltip:not(.v-tooltip--interactive) > .v-overlay__content Fixes vuetifyjs#22724
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22724.
Problem
Non-interactive tooltips do not disappear on mouseover since v4.0.2. The tooltip always behaves as if
:interactive="true".Root Cause
In
VTooltip.sass, thepointer-events: nonerule for non-interactive tooltips used incorrect SASS nesting:The
&resolves to.v-overlay__content, producing the CSS selector:This never matches because:
.v-tooltip--interactiveis applied to.v-tooltip(the root), not.v-overlay__content.v-overlay__contentdoes not contain a nested.v-overlay__contentFix
Move the rule out of the nested block so
:not()targets.v-tooltip:This produces the correct CSS:
The rule sits in
tools.layer('overrides'), which correctly overrides thepointer-events: autofromVOverlay.sassintools.layer('components').