-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
fix(VTooltip): display intrinsic maximum width content #16350
Conversation
Find a one line change solution and PR has been updated |
@yuwu9145 wdyt about this instead? diff --git a/packages/vuetify/src/components/VOverlay/locationStrategies.ts b/packages/vuetify/src/components/VOverlay/locationStrategies.ts
index a130cee65..9fd584f4c 100644
--- a/packages/vuetify/src/components/VOverlay/locationStrategies.ts
+++ b/packages/vuetify/src/components/VOverlay/locationStrategies.ts
@@ -407,13 +407,9 @@ function connectedLocationStrategy (data: LocationStrategyData, props: StrategyP
props.maxHeight,
],
() => updateLocation(),
- { immediate: !activatorFixed }
)
- if (activatorFixed) nextTick(() => updateLocation())
- requestAnimationFrame(() => {
- if (contentStyles.value.maxHeight) updateLocation()
- })
+ nextTick(() => updateLocation())
return { updateLocation }
} I don't remember exactly why I had |
removing |
scope?.stop() | ||
updateLocation.value = undefined | ||
|
||
if (!(IN_BROWSER && data.isActive.value && props.locationStrategy)) return | ||
|
||
scope = effectScope() | ||
if (!(props.locationStrategy === 'connected')) { await nextTick() } |
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.
Could this break anything when locationStrategy
is NOT connected
?
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.
I suppose it could technically break any custom locationStrategy, that's probably very uncommon though and I think it should always be handled by the strategy itself instead.
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.
Yes, I agree. watchEffect should not have any nextTick
from logical perspective
see #16318 fixes #16321 closes #16350 Co-authored-by: Yuchao <[email protected]>
This did end up breaking menus, added a fix and TODO to look at later. |
fixes #16321
Cause:
offsetWidth
&offsetHeight
returns different values between first activate and second activate.contentBox.x -= parseFloat(el.style.left || 0)
. when hover from the second time and afterwards, contentBox will be initially rendered outside page and tooltip overlay initially shows as two lines sooffsetWidth
&offsetHeight
returns inconsistent valuesSolution so far:
display intrinsic maximum width content
Description
Motivation and Context
How Has This Been Tested?
Markup:
Types of changes
Checklist:
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes).