Page MenuHomePhabricator

Search suggestion appears in the same location for all searchSuggestion instances
Closed, DuplicatePublicBUG REPORT


Steps to Reproduce:

  1. Enter some text in the search suggest textbox other than the page search suggest input.
  2. Wait for suggestions to appear

Expected Results:

Suggestion box should appear below the textbox.

Actual Results:

Suggestion box appears above the textbox. Problem is only with the Timeless skin.

See image below,

Other details:

The timeless skin adds the following CSS,

div.suggestions {
	position: fixed;
	top: 2.75em !important; // Override js-provided value to account for fixed header

div.suggestions is the element / box that appears below the textbox.

This is done in the commit here. To fix the issue here -T131993: Search suggestions should stay with fixed-position header when scrolling

The Timeless plugin has a fixed header with the page search feature. When the user scrolls the page the suggestion box scrolls away due to it being position absolute. To fix this, the position:fixed was added to it along with a static top value. This fixes the issue for that specific scenario, but will cause issues with any other searchSuggest / jquery.suggestion instances.

A possible way to fix this would be to add a custom class to the div.suggestions box and add the CSS to it using that class, but I don't see that being possible with the current API for searchSuggest or jquery.suggestion.