Skip to content

Commit

Permalink
fix(Search): pressing up/down arrow in the search input causes error (#…
Browse files Browse the repository at this point in the history
…1600)

* changes to ComponentDidUpdate event listener logic

* adjust event listener changes

* remove original changes and adjust scrollItemIntoView
  • Loading branch information
josie11 authored and levithomason committed Apr 21, 2017
1 parent af2807f commit 3806073
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ export default class Search extends Component {
if (!isBrowser) return
const menu = document.querySelector('.ui.search.active.visible .results.visible')
const item = menu.querySelector('.result.active')
if (!item) return
debug(`menu (results): ${menu}`)
debug(`item (result): ${item}`)
const isOutOfUpperView = item.offsetTop < menu.scrollTop
Expand Down

0 comments on commit 3806073

Please sign in to comment.