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.1.4] Elements with overlays not present in DOM initially attached to wrong overlay containers #16610

Closed
luka-mikec opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels
C: VOverlay VOverlay T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Milestone

Comments

@luka-mikec
Copy link
Contributor

luka-mikec commented Feb 8, 2023

Environment

Vuetify Version: 3.1.4
Vue Version: 3.3.0-alpha.4
Browsers: Chrome 109.0.0.0
OS: Linux x86_64

Steps to reproduce

  1. Open the reproduction link
  2. Click "Change attach target (click me first)"
  3. Click "Show v-select (click me second)"
  4. Click on the v-select that has just appeared

Expected Behavior

The v-select's menu is visible. Changing attach target should only affect the v-menu, but not the v-select, which is a completely unrelated component in this code.

Actual Behavior

The overlay belonging to v-select is teleported to the v-menu's overlay. As the v-menu's attach target has display: none;, the v-select's list is not shown.

Reproduction Link

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

Other comments

Maybe has something to do with this line:

let container = targetElement.querySelector('.v-overlay-container')

It seems to always pick the first .v-overlay-container in the DOM, but it might not be the desired one. Note that it seems important that the attach target has changed before showing the new element (v-select in this case), otherwise it works as expected.

@KaelWD
Copy link
Member

KaelWD commented Feb 8, 2023

#16409

@nekosaur I guess that answers your WeakMap question.

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke C: VOverlay VOverlay and removed S: triage labels Feb 8, 2023
@KaelWD KaelWD added this to the v3.1.x milestone Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay VOverlay T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Projects
None yet
Development

No branches or pull requests

3 participants