fix(vmenu): sets bottom style property when using top prop #14239
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.
fix #8454
Disclaimer: I noticed this issue was closed only after working on it. Still made a PR as this is my first contribution ever and I guess it does not cost too much. I'd understand if this PR has to be refused.
Description
When double clicking quickly the activator of a
v-menu
with scale transition andtop
prop, it reopened lower than it should. The reason of this behavior is that the closing animation of the "first"v-menu
is not finished when calculating thetop
style property of the "second" one.To fix that,
when usingI added a promise ontop
prop, I set thebottom
style property instead of thetop
one, using the activator top position which makes it consistent regardless of the animation.transitionend
event, and only updates the dimensions once it resolves.fixes #8454
Motivation and Context
The change itself helps fixing an UI behavior (#8454)
How Has This Been Tested?
visually
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).