You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the property focusDescendants, that List inherits from delite/KeyNav, is true (default), navigating a list item gives it the focus, thus, if the List is scrollable, the browser automatically scrolls the item such that it remains visible.
So far so good, but if focusDescendants is set to false, there's no autoscroll anymore. Since the browser can't handle it automatically without focus given to the navigated item, this needs to be done by code.
At the first sight, going with the native scrollIntoView() method seems appealing, but this doesn't seem well supported by all supported browsers, and breaks the layout if the List is inside a dropdown of delite/HasDropDown.
Remains the option to add autoscroll code doing geometric computations and setting the scrollTop property of the scrolling container (the List). But we'd still need to decide if it should be added to List or it's worth going to delite/Scrollable, and also about how sophisticated should be the computations (whether the simplistic variant currently used in https://github.com/ibm-js/deliteful/blob/0.6.0-alpha/Combobox.js#L649 is good enough; ideally, it should match the behavior of the native node.scrollIntoView()).
The text was updated successfully, but these errors were encountered:
At the first sight, going with the native scrollIntoView() method seems appealing, but this doesn't seem well supported by all supported browsers, and breaks the layout if the List is inside a dropdown of delite/HasDropDown.
Hmm, which test case were you using, and which browsers didn't work?
When the property focusDescendants, that List inherits from delite/KeyNav, is true (default), navigating a list item gives it the focus, thus, if the List is scrollable, the browser automatically scrolls the item such that it remains visible.
So far so good, but if focusDescendants is set to false, there's no autoscroll anymore. Since the browser can't handle it automatically without focus given to the navigated item, this needs to be done by code.
At the first sight, going with the native scrollIntoView() method seems appealing, but this doesn't seem well supported by all supported browsers, and breaks the layout if the List is inside a dropdown of delite/HasDropDown.
Remains the option to add autoscroll code doing geometric computations and setting the scrollTop property of the scrolling container (the List). But we'd still need to decide if it should be added to List or it's worth going to delite/Scrollable, and also about how sophisticated should be the computations (whether the simplistic variant currently used in https://github.com/ibm-js/deliteful/blob/0.6.0-alpha/Combobox.js#L649 is good enough; ideally, it should match the behavior of the native node.scrollIntoView()).
The text was updated successfully, but these errors were encountered: