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

List: autoscrolling for focus-less mode #498

Open
AdrianVasiliu opened this issue Jan 29, 2015 · 2 comments
Open

List: autoscrolling for focus-less mode #498

AdrianVasiliu opened this issue Jan 29, 2015 · 2 comments
Assignees
Labels

Comments

@AdrianVasiliu
Copy link
Contributor

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()).

@AdrianVasiliu AdrianVasiliu self-assigned this Jan 29, 2015
@AdrianVasiliu AdrianVasiliu added this to the 0.7.0 milestone Jan 29, 2015
@AdrianVasiliu
Copy link
Contributor Author

Originates from @wkeese #497 (comment).

@wkeese
Copy link
Member

wkeese commented Jan 30, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants