Bug Tracker

Opened 14 years ago

Closed 13 years ago

#3576 closed enhancement (invalid)

[autocomplete] Showing results at page bottom, and not at the input field

Reported by: Tomasso Owned by: joern
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: autocomplete, scroll Cc: [email protected]
Blocked by: Blocking:


When the autocomplete input field is inside a div which has a scrollbar, the results will not be shown at the input field position as expected, but probably at the bottom of the page. To fix that issue I modified the showResults function as follows:

function showResults() {

get the position of the input field right now (in case the DOM is shifted) var pos = findPos(input); either use the specified width, or autocalculate based on form element var iWidth = (options.width > 0) ? options.width : $input.width();

var firstParentDIV; var currentNode = input; while (currentNode.tagName.toLowerCase() != "div"){

currentNode = currentNode.parentNode;


reposition $results.css({

width: parseInt(iWidth) + "px", top: ((pos.y + input.offsetHeight) - currentNode.scrollTop) + "px", left: pos.x + "px"



Thank You:

Pablo Tomas Borda Di Berardino

Change History (3)

comment:1 Changed 14 years ago by flesler

Owner: set to joern

comment:2 Changed 13 years ago by dmethvin

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .

comment:3 Changed 13 years ago by john

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.