Skip to content
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

[Bug Report][3.6.0] VSelect menu shifted few pixels to the right #19732

Open
crystalfp opened this issue May 1, 2024 · 8 comments
Open

[Bug Report][3.6.0] VSelect menu shifted few pixels to the right #19732

crystalfp opened this issue May 1, 2024 · 8 comments
Assignees
Labels
C: VOverlay VOverlay T: enhancement Functionality that enhances existing features
Milestone

Comments

@crystalfp
Copy link

Environment

Vuetify Version: 3.6.0
Vue Version: 3.4.26
Browsers: Chrome 124.0.0.0
OS: Windows 10

Steps to reproduce

Open the dropdown menu.
Notice the menu is shifted to the right by 5-10 pixels.
Now remove the width style on the container div and the menu returns to normal position.

Expected Behavior

The menu be exactly below the selector.

Actual Behavior

It is shifted to the right if the container specifies a width.

Reproduction Link

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

Other comments

The two

containers are part of the application.

@johnleider
Copy link
Member

This is happening because of edge detection and I don't think it's a bug. @KaelWD thoughts?

@crystalfp
Copy link
Author

Respectfully disagree. An unexpected behavior caused by something outside my control that gives a visual look not in line with the quality of the framework for me is a bug.

Anyway, changing the DIVs with VContainers changed nothing.
The width cannot be removed because the selector is in a side panel of a flex container.

Thanks for looking!
mario

@johnleider
Copy link
Member

I'm not saying your issue doesn't have merit, just that it's not a bug. If it's not something that can be disabled maybe we add an option to do just that.

@yuwu9145
Copy link
Member

yuwu9145 commented May 4, 2024

locationStrategy has a hardcoded viewportMargin as 12px, seems to deliberately keep Overlay minimum 12px away from edge by default. There must be a good reason behind it.

If parent div has a margin over 12px, it's working as expected demo

@crystalfp
Copy link
Author

Yes, putting the margin makes the dropdown stay where it should stay. Well, the overall effect is not nice as before (the selector filling the upper side of the sidebar) but acceptable.
Will be nice if you would like to investigate if this margin is really necessary o if it is possible to switch off (maybe with an option).
Anyway, thanks a lot for vuetify! With it my application has a very professional look.

@johnleider
Copy link
Member

I think that the user should be able to opt out of this functionality. Surely it can't be too difficult to allow disabling.

@KaelWD KaelWD self-assigned this May 6, 2024
@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VOverlay VOverlay and removed S: triage labels May 6, 2024
@yuwu9145
Copy link
Member

yuwu9145 commented May 8, 2024

@KaelWD What was the reason behind

@KaelWD
Copy link
Member

KaelWD commented May 8, 2024

<template>
  <v-app>
    <v-navigation-drawer>
      <v-select />
    </v-navigation-drawer>
    <v-container>
      <div style="height: 1000px" />
      <v-btn>
        <v-menu activator="parent" location="end">
          <v-list>
            <v-list-item v-for="i in 100">Item</v-list-item>
          </v-list>
        </v-menu>
      </v-btn>
      <div style="height: 3000px" />
    </v-container>
  </v-app>
</template>

Had a chat with John about this on monday, I have an idea for how to fix it.

@johnleider johnleider added this to the v3.6.x milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay VOverlay T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

4 participants