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

Search: Pressing up/down arrow in the search input with no results throws errors to console #1592

Closed
maciej-gurban opened this issue Apr 17, 2017 · 3 comments

Comments

@maciej-gurban
Copy link

Steps to Reproduce

  1. Start typing in the search input box (random characters, just make sure there's no results)
  2. While still having the input focused, press arrow up or down on the keyboard

Reproducible in all demos of search component

Expected
No error should be thrown

Result
The following error is shown in the console:

Uncaught TypeError: Cannot read property 'offsetTop' of null
    at t.a.scrollSelectedItemIntoView (app.d0cf20c….js:7194)
    at t.a.moveSelectionBy (app.d0cf20c….js:7194)
    at HTMLDocument.a.moveSelectionOnKeyDown (app.d0cf20c….js:7194)
@maciej-gurban maciej-gurban changed the title fix(Search): Pressing pp/down arrow in the search input with no results will cause offsetTop errors fix(Search): Pressing up/down arrow in the search input with no results throws errors to console Apr 17, 2017
@layershifter layershifter changed the title fix(Search): Pressing up/down arrow in the search input with no results throws errors to console Search: Pressing up/down arrow in the search input with no results throws errors to console Apr 18, 2017
@levithomason
Copy link
Member

Fixed in #1600

@maciej-gurban
Copy link
Author

maciej-gurban commented Apr 21, 2017

Damn, you guys are fast. Thanks!

Also, I've been working with the library for a few days now, and I have to say it's pretty damn well written and so nicely extensible.

@levithomason
Copy link
Member

Woot! 🦉

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

No branches or pull requests

3 participants