-
Notifications
You must be signed in to change notification settings - Fork 13
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
lit-virtualizer doesn't work os iOS/ipadOS properly #54
Comments
It seems that it happens when you try to append element to shadow DOM root. If in |
The Was the removal of |
Thanks for bringing this to my attention. I'm not inclined to restore this API option, but I will figure out a way to fix the issue with mobile Safari. |
I filed this WebKit bug with a simple repro case: https://bugs.webkit.org/show_bug.cgi?id=226195 Meanwhile, I am working on a temporary fix. |
I think the best workaround for now is for virtualizer not to use Shadow DOM at all but instead set CSS properties directly via the host element's This is a bit ugly and requires some care, but I can't think of a better option. Specifically, virtualizer will:
This will allow everything to "just work" in the most common case where virtualizer is in complete control, while still allowing these properties to be overridden by the developer (using explicit style props or stylesheet rules with Does that sound reasonable to you, @bramkragten & @KapJI? |
Yes, that sounds ok, we used to have something like that with using the directive without |
I think this should work. Have you considered just wrapping it with extra |
Thanks for the suggestion, @KapJI! I took a quick look at what it would mean to wrap the light-dom children in a |
Thanks! |
I noticed lit-virtualizer doesn't work on iOS both in Safari and Chrome. Scrolling stops when new element is added in VirtualScroller. So you can scroll one item at time. You can see this on your examples.
But at the same time it works fine in Safari and Chrome on macOS as well as in Chrome for Android.
Interestingly, that example
scroll-to-index-lit-html
withscroll()
works fine. I'm not sure what the difference is. But simple replacing<lit-virtualizer>
withscroll()
doesn't help in the project which I'm trying to fix :(The text was updated successfully, but these errors were encountered: