Fix position of typeahead dropdown when the element is within an offsetParent

When an element is absolutely positioned, it is positioned relative to the offsetParent - the next absolute or relatively positioned element. Fixes the calculation of position for the dropdown to take this into account.