vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.6.7] Behavior of VMenu position when scrolling on the page

Open Co-7 opened this issue 1 year ago • 2 comments

Environment

Vuetify Version: 3.6.7 Vue Version: 3.4.27 Browsers: Firefox 127.0 OS: Windows 10

Steps to reproduce

I create a simple Vmenu with a list of elements abnd when I open the menu and scroll down the page, the wrong behavior appears.

Expected Behavior

The menu remains open but disappears when you scroll down the page and reappears when you scroll back up.

Actual Behavior

When I scroll, the menu remains on the screen as if it were in a fixed position on the page.

Reproduction Link

https://play.vuetifyjs.com/#...

firefox_6MDsJk4OZF

In Vue 2 behavior is good :

firefox_kQcix9WMak

Co-7 avatar May 22 '24 09:05 Co-7

Another reproducible link is actually docs page: https://vuetifyjs.com/en/components/menus/#popover-menu

https://github.com/vuetifyjs/vuetify/assets/1439238/33261e36-e3cc-4029-9fa1-31f174909c4e

Mikrovolnovka avatar Jun 04 '24 13:06 Mikrovolnovka

I tried changing the scroll-strategy property to none, but the problem is that the menu no longer repositioned itself.

firefox_GGsbExvO4G

PlayGround

Co-7 avatar Jun 19 '24 10:06 Co-7

Maybe we can add a new scroll strategy?

johnleider avatar Feb 10 '25 22:02 johnleider

Yes, If the behavior I consider a bug is intentional, I think a different scrolling strategy could be a solution to restore vue 2 behavior 👍

Co-7 avatar May 06 '25 09:05 Co-7

Actually, from the current implementation perspective, the behavior of shifting overlay content to keep it visible belongs in locationStrategies.ts. I can suppress the behavior by commenting out y adjustments in the //shift and //size blocks. The change will be trivial once we agree on the condition to put there. Should it be a new prop sticky? keep-visible? or should we rather recognize non-null attach.

J-Sek avatar May 06 '25 10:05 J-Sek

Actually, from the current implementation perspective, the behavior of shifting overlay content to keep it visible belongs in locationStrategies.ts. I can suppress the behavior by commenting out y adjustments in the //shift and //size blocks. The change will be trivial once we agree on the condition to put there. Should it be a new prop sticky? keep-visible? or should we rather recognize non-null attach.

@KaelWD @jcjp

johnleider avatar May 06 '25 22:05 johnleider