-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Can't scroll in Safari (Demo Site) #23
Comments
@AStoker In Safari 9 on OS X El Capitan I'm not able to scroll with the touchpad. Mouse wheel and key up/down is working. Is this what you are experiencing as well? That is right, the scroll indicator is a custom one. Since the list is virtual, and the scroll height does not represent the list height, a native scrollbar can't be used. However we have plans for making the scroll indicator draggable. This plugin is going to change a lot and is still in early development. So I would not recommend using it in production yet. |
I'm on the same setup. However I'm using the mouse (the magic mouse that is). .scroll-container {
overflow: scroll;
} <div class="scroll-container">
<ul class="scrolling-list">
<li class="scroll-top-buffer"></li>
<li virtual-repeat.for="item of items">
<template replaceable part="item-template"></template>
</li>
<li class="scroll-bottom-buffer"></li>
</ul>
</div> You could then as you scroll through the list of items, determine the height of the element you're popping off and add that height to the That might be a completely different implementation than what you're creating though. However, a benefit of this design would also allow you to have list elements of different size (#24), since you're not computing the buffer size until it's been created in the DOM, and then popped off. The only downside of that, I guess, would be that you might not know the exact height of the entire list at creation time, and so your scroll bar wouldn't be correct in it's size. Sorry, super long response. |
That is acctually one of the approches I started out with. Except was only using the cc @stoffeastrom do you have any input on this? |
@martingust As discussed. I think the best way is to have a _Data_ - It needs to know how many rows you have etz Ofc, the devil is in the details but they would need to be hashed out.. |
After giving this some more thought I also think keeping |
Sorry, was away for thanksgiving, so I couldn't contribute to the discussion. |
@AStoker If I understand the nested approach you mentioned you add height to the buffer as you scroll through the list and at some point in a very long list the buffer element will be too tall for the browser to handle and the scrolling would break down. Or did I misunderstand your approach? Here is an example with react virtual list if I change item height from 100 to 200 I won't be able to scroll all the way through the list in Chrome. In IE 11 it breaks already at 8000 items with 200 item height. This would not happen with a purely virtual list. With performance I was also thinking about the ability to take advantage of hardware acceleration with CSS 3D transforms when the plugin simulates scrolling. Perhaps that is possible with native scroll as well with With flexibility as you said the ability to plugin different scrollbars. But also the ability to handle different scroll behaviors like momentum scroll, snap to grid functionality etc. I see pros and cons with both approaches, and as @stoffeastrom mentioned it all depends on the requirements. Perhaps if right things are separated the plugin could support both approaches. Thoughts? |
Thanks for that example @martingust, that definitely changes my opinion in this case. You could still take this approach, but modify it a bit so that your scroll element's height reaches a max height, and you actually use Javascript to manage the heights instead of relying on the elements themselves. This approach would have to kick in at a height where the scroll bar reaches it's smallest size (a percentage of the window height). |
@AStoker It would be awesome if you wanted do a native scroll implementation. And then we can see what parts can be re-used or replaced. I'm making some big refactorings right now, please feel free to hit me up on Gitter so we can align. |
Sounds good. I'll try to get to it in the next few weeks (hopefully your big refactors will be implemented by then). Got some big deadlines coming up at work, and the need for a virtual list is on a less prioritized project. |
Hi I played around with this while trying to learn more html/javascript: One thing I notice/you can see it in the react demo also, is that when list is big and you scroll really quickly to bottom IE and maybe other browsers will have a performance issue(laggy scrolling), so really should not do anything at that moment, better to wait for user to stop scrolling. |
@vegarringdal In most cases not. But there are definitely use cases where the requirements are to display 8000 rows or more. It would be great to be able to support these use cases and without a performance degradation, I think we can. We are experimenting with @AStoker:s approach in this branch: https://github.com/aurelia/ui-virtualization/tree/native-scrolling If it turns out good it will get merged/implemented in master. |
Fixed in dc486a9 |
Opened up the Demo site to ensure it would work for our needs in Safari, but I cannot scroll the list.
I am unable to use the scroll indicator to drag (looks like a custom one), and there are no errors in the console either.
The text was updated successfully, but these errors were encountered: