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

When Opening A <sl-dropdown> With hoist Set For The First Time, <sl-menu> Is Strangely Positioned #843

Closed
Zozman opened this issue Jul 31, 2022 · 0 comments · Fixed by #844
Assignees
Labels
bug Things that aren't working right in the library.

Comments

@Zozman
Copy link

Zozman commented Jul 31, 2022

Describe the bug

When attempting to open a <sl-dropdown> for the first time by clicking on it when the hoist property has been set, the corresponding <sl-menu> is strangely positioned and the height is incorrect. Upon clicking the <sl-dropdown> again to close it and a third time to open it again, the <sl-menu> is correctly positioned and all subsequent openings are fine. But the first one is always messed up.

To Reproduce

Steps to reproduce the behavior:

  1. Create a <sl-dropdown> with the hoist property set
  2. Click on the element set to trigger opening the <sl-dropdown>
  3. Observe the corresponding <sl-menu> is incorrectly positioned

Demo

Issue can be seen at https://codepen.io/zozman/pen/vYRpgGK?editors=1000 by clicking on the Hoisted <sl-dropdown> (this is a copy of the example from https://shoelace.style/components/dropdown?id=hoisting where it can also be seen).

Screenshots

hoistError
hoistError2

Browser / OS

  • OS: Windows
  • Browser: Chrome
  • Browser version: 103.0.5060.134
@Zozman Zozman added the bug Things that aren't working right in the library. label Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants