Skip to content

The combobox doesn't scroll when navigating #24

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

Closed
bnjamin opened this issue Jun 26, 2019 · 2 comments · Fixed by github/combobox-nav#10
Closed

The combobox doesn't scroll when navigating #24

bnjamin opened this issue Jun 26, 2019 · 2 comments · Fixed by github/combobox-nav#10

Comments

@bnjamin
Copy link
Contributor

bnjamin commented Jun 26, 2019

After PR #15 the combobox no longer scrolls when navigating with the arrow keys.

I've made a small example here https://auto-complete-scroll.glitch.me it is the example from this repo, but where I've added a height: 45px; overflow-y: auto; styling to the ul element.

The problem is that the select method in autocomplete.js is no longer called when navigating, so the scrollTo function is never called.

It can be fixed by either moving the scroll functionality to the combobox-nav project instead, or have the combo-box fire an combobox-navigation event and then listen for that and perform the necessary scrolling.

If one of the proposed methods are suitable, I can submit a PR.

@bnjamin bnjamin changed the title The The combobox doesn't scroll on navigation Jun 26, 2019
@bnjamin bnjamin changed the title The combobox doesn't scroll on navigation The combobox doesn't scroll when navigating Jun 26, 2019
@muan
Copy link
Contributor

muan commented Jun 26, 2019

Good catch!

I think scroll should happen in combobox-nav (so scroll.js should be moved there), and the unused function here should be cleaned up.

@muan
Copy link
Contributor

muan commented Jul 16, 2019

Fix is out in https://github.com/github/auto-complete-element/releases/tag/v1.0.3. Thanks again for investigating and fixing this.

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

Successfully merging a pull request may close this issue.

2 participants