AutoSuggest
AutoSuggest copied to clipboard
Update AutoSuggest.js
getComputedStyle(element, 'line-height') was returning 'normal' thus NaN and placing the .top position incorrectly at zero. Fixed by defaulting to font-height if line-height isn't numeric.
@mhassman getComputedStyle method is costly and you are calling it twice, please store it in a variable and reuse it