Skip to main content

Search and Top Navigation

#8749 closed bug (fixed)

Opened October 30, 2012 12:57PM UTC

Closed October 30, 2012 08:26PM UTC

Last modified November 08, 2012 10:52PM UTC

Autocomplete dropdown positioned incorrectly in IE

Reported by: amasniko Owned by:
Priority: minor Milestone: 1.9.2
Component: ui.autocomplete Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

The problem is reproducible with both IE 8 and 9, but works fine in Firefox. When the screen has to be scrolled down to reach the input element on which autocomplete is enabled, after the first keystroke the dropdown appears somewhere above the input. On the second keystroke it moves to the correct position.

You can try try it here (make sure you use IE): http://jsbin.com/eyipab/1

Fortunately, the fix is very simple. Just adding this to the style corrects the problem:

.ui-autocomplete {
	left: 0;
}

It turns out that the "left" value is "auto" by default and the code in that case takes a different path.

Attachments (0)
Change History (7)

Changed October 30, 2012 01:27PM UTC by tj.vantoll comment:1

resolution: → wontfix
status: newclosed

Thanks for taking the time to contribute to the jQuery UI project! Your test case is in quirks mode which jQuery and jQuery UI do not support. If I add a doctype to your test case it functions fine in IE8 and IE9 - http://jsbin.com/eyipab/6.

Changed October 30, 2012 06:06PM UTC by amasniko comment:2

Fair enough, I over trimmed the test case. I put back the some style to html and body elements I had initially removed and even with the doctype declaration IE exhibits the problem.

Now, I do not quite remember why I had to add that style. There are quite a few more nested elements on the real page and I needed them to get the effect I wanted. Regardless, I think the style is still valid and the dropdown should appear where it is supposed to like it does in Firefox.

The modified page is here http://jsbin.com/eyipab/9

Changed October 30, 2012 08:25PM UTC by scottgonzalez comment:3

resolution: wontfix
status: closedreopened

Changed October 30, 2012 08:26PM UTC by scottgonzalez comment:4

I don't think we support the styles you're setting on html/body, but this is an easy fix.

Changed October 30, 2012 08:26PM UTC by Scott González comment:5

resolution: → fixed
status: reopenedclosed

Autocomplete: Set initial left position for menu. Fixes #8749 - Autocomplete dropdown positioned incorrectly in IE.

Changeset: d693ce5324f6f3be8479ef083e4eaf3c705ef043

Changed November 08, 2012 10:52PM UTC by Scott González comment:6

Autocomplete: Set initial left position for menu. Fixes #8749 - Autocomplete dropdown positioned incorrectly in IE.

(cherry picked from commit d693ce5324f6f3be8479ef083e4eaf3c705ef043)

Changeset: 8f0daea9eb0b5e6feb31b1e69878919bce78cef1

Changed November 08, 2012 10:52PM UTC by scottgonzalez comment:7

milestone: 1.10.01.9.2