-
Notifications
You must be signed in to change notification settings - Fork 85
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
Actions menu / Popover flying arrow on close #1610
Comments
It as only solved by #831 by pure luck. (and reverted) I found the root cause: during the closing animation of the Actions menu, the property "opened" is already set to false, and the menu contents DOM is cleared too early. This is what prompts popper to update the position during the animation. A quick fix is to remove the "opened" condition and always let the menu render itself, even when not opened. |
quick patch here: diff --git a/src/components/Actions/Actions.vue b/src/components/Actions/Actions.vue
index a586b75..f88e23b 100644
--- a/src/components/Actions/Actions.vue
+++ b/src/components/Actions/Actions.vue
@@ -140,7 +140,7 @@ https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-action
</button>
<!-- Menu content -->
- <div v-show="opened"
+ <div
ref="menu"
:class="{ open: opened }"
tabindex="-1"
@@ -154,7 +154,7 @@ https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-action
@mousemove="onMouseFocusAction">
<!-- menu content -->
<ul :id="randomId" tabindex="-1">
- <template v-if="opened">
+ <template>
<slot />
</template>
</ul> but I now still have mixed feelings... if Actions menus are used in a list, it might cause too many DOM elements to be rendered. In general I'd rather expect the VPopover/v-tooltip/popper to destroy its contents after hiding. |
to clarify, Popper (the v-tooltip and Popover backend) has a resize observer that checks if the popup contents changes whenever we flip the "opened" state, it will render or unrender the elements inside the popup, which is detected as change, so popper will update the popup's position now, since we also have some animation in place, it will animate to the new position |
@PVince81 Is this still an issue? |
I tried again, I needed to click 10-15 times with different speeds to make it appear. Now, am not sure if it's worth fixing... The only thing that matters I think is that we move away from v-tooltip for the Popover, as v-tooltip has many issues with timings and events. |
We use |
Should be fixed with using |
To be able to see it, need the actions popover to overlay some dark background.
Steps
Expected result
The closing animation of the menu doesn't leave a flying arrow.
Actual result
The arrow will move to some direction and keep its opacity until the menu is closed.
With the arrow, I mean this one:
The text was updated successfully, but these errors were encountered: