WICG / virtual-scroller

Other
2k stars 83 forks source link

How do we handle navigating to links deep within an invisible root? #139

Closed bicknellr closed 5 years ago

bicknellr commented 6 years ago

One area that we need to explore with invisible DOM is how we handle navigation to an element that's inside an invisible root and would be laid out very far down in the box of that invisible root. The virtual scroller implementation here is able to scroll to an item but it doesn't currently handle scrolling to the actual element once the viewport has been moved to the item - should it? In general, what amount of scrolling behavior should be built in and what amount should be left to the author that has decided to use invisible DOM? If most of this behavior were left to the author to implement, what other things need to be exposed to reach parity with the browser's default behavior on pages without invisible DOM (if anything)?

cc @ojanvafai

ojanvafai commented 6 years ago

@domenic @rakina something for us to think through what the UX should be and what that implies about how virtual-scroller + invisible DOM should work.

bicknellr commented 5 years ago

Trying to recap some info from a meeting:

I think we settled on letting the browser itself scroll to the correct position assuming that it attempts to scroll only once it finishes dispatching 'activateinvisible', during which the virtual-scroller will make that element visible.

rakina commented 5 years ago

Closing this as this is related to the virtual-scroller prototype implementation and we intend to make this repository focus on the standards side of it.