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

Scrollbar is not restored to "top" position after changing the query string #1102

Open
paulinasd opened this issue Jan 20, 2015 · 5 comments

Comments

@paulinasd
Copy link

I use typeahead.js library with height (css) on suggestions container added, in order to make list scrollable. The height of suggestions container is never changing, because my custom function that generates suggestion list, returns all source items, with the ones, matching the query, rendered on top of list.

Scrollbar on suggestions container is not restored after these steps:

  • enter search query
  • scroll down to the last item and select it
  • change query to get suggestion list again

Result: scrollbar is on the bottom of container, the same position it was set after entering the first query.

@MorisatoK
Copy link

Having the same issue, and because of #1141 it can not be worked around easily. This can also be reproduced on the example pages.

@CC1337
Copy link

CC1337 commented Mar 17, 2015

+1

2 similar comments
@bb
Copy link

bb commented Mar 30, 2015

+1

@CaptainPsycho
Copy link

+1

@jharding jharding added this to the 0.11.2 milestone Apr 27, 2015
@Wound
Copy link

Wound commented Jan 13, 2017

Even though this is an old issue, if for any reason anybody is stuck on an old version of typeahead, this is what I did to solve the problem in my case with typeahead 0.9.3:

I patched typeahead.js. In function 'renderSuggestions' in class 'DropdownView' insert the following:

this._ensureVisibility(this.$menu.find(".tt-suggestion").first());

after the line

$dataset.show().find(".tt-suggestions").html(fragment);

At least that solved it for me. Happy patching!

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

No branches or pull requests

7 participants