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

<sl-select> is slow to open inside <sl-drawer> #915

Closed
kazk opened this issue Sep 16, 2022 · 4 comments
Closed

<sl-select> is slow to open inside <sl-drawer> #915

kazk opened this issue Sep 16, 2022 · 4 comments
Assignees
Labels
bug Things that aren't working right in the library. upstream An upstream issue is blocking the issue.

Comments

@kazk
Copy link

kazk commented Sep 16, 2022

Describe the bug

sl-select component inside sl-drawer is extremely slow since 2.0.0-beta.81.
sl-select is broken inside sl-drawer in 2.0.0-beta.80.
2.0.0-beta.79 works as expected.

It's very noticeable with many items.

To Reproduce

Steps to reproduce the behavior:

  1. Add sl-select with many items inside sl-drawer
  2. Open sl-drawer
  3. Use sl-select

The same sl-select works fine outside.

Demo

https://jsfiddle.net/kazk/2jsp3Lxe/46

Screenshots

sl-select-drawer-demo.mp4

Browser / OS

  • Latest Chromium/Firefox on Linux

Additional information

Please let me know if you need anything else. Thanks for Shoelace! :)

@kazk kazk added the bug Things that aren't working right in the library. label Sep 16, 2022
@claviska
Copy link
Member

Thanks for the issue. I believe this is the same problem as mentioned in #902. I'll take a look!

@claviska
Copy link
Member

claviska commented Sep 19, 2022

I replicated the issue and, per @atomiks suggestion in this discussion, have confirmed that the polyfill introduced here introduced this behavior in Floating UI 1.0.1.

This has been fixed in beta.83. I've reverted Floating UI to 1.0.0 in 28003ac for now, but I'll leave this open until there's an upstream fix or a way to opt out of the poor-performing behavior.

Thanks again for reporting this issue!

@claviska claviska added the upstream An upstream issue is blocking the issue. label Sep 19, 2022
@claviska claviska changed the title sl-select is extremely slow inside sl-drawer since .81 (broken in .80) <sl-select> is slow to open inside <sl-drawer> Sep 19, 2022
@kazk

This comment was marked as off-topic.

@claviska
Copy link
Member

claviska commented Nov 7, 2022

This was fixed upstream in: floating-ui/floating-ui#1894

I've upgraded Shoelace to use the latest version of Floating UI in 8160c33 and I'm no longer seeing this lag, so I'm going to close this one now.

@claviska claviska closed this as completed Nov 7, 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. upstream An upstream issue is blocking the issue.
Projects
None yet
Development

No branches or pull requests

2 participants