Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6201 closed bug (fixed)

Autocomplete: Broken menu in IE8 Standards Mode when including prototype framework

Reported by: unt01d Owned by:
Priority: major Milestone: 1.8.6
Component: ui.autocomplete Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:

Description

The autocomplete plugin doesn't work in IE8 Standards Mode when including the prototype framework and using jQuery.noConflict(). The javascript error "Object doesn't support this property or method" is displayed when attempting to display the results list. Note this is only an issue in these specific circumstances - switching to Compatibility Mode or removing the prototype library prevents the issue from happening.

The problem seems to be the statement "menuWidth = ul.width( "" ).outerWidth();" - it looks like ul.width( "" ) returns an object in Compatibility Mode but returns a number in Standards Mode.

Please see the attached file in order to replicate the issue.

Attachments (3)

autocomplete_ie8_bug.html (1.6 KB) - added by unt01d 7 years ago.
autocomplete_ie8_bug.2.html (1.7 KB) - added by unt01d 7 years ago.
autocomplete_ie8_bug.3.html (1.7 KB) - added by unt01d 7 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by unt01d

Attachment: autocomplete_ie8_bug.html added

comment:1 Changed 7 years ago by Scott González

Milestone: TBD1.9
Resolution: fixed
Status: newclosed
Summary: Issue with autocomplete in IE8 Standards Mode when including prototype frameworkAutocomplete: Broken menu in IE8 Standards Mode when including prototype framework

Fixed in eab0a6d. Requires jQuery 1.4.3 for correct width.

comment:2 Changed 7 years ago by unt01d

Resolution: fixed
Status: closedreopened

Thanks for the swift fix! I can see the dropdown now, however I'm still getting the same runtime error when using jQuery 1.4.3 (I'm using the nightly build because the stable release threw up lots of prototype errors!).

comment:3 Changed 7 years ago by Scott González

Resolution: fixed
Status: reopenedclosed

I'm not sure what nightly build you're referring to, but using jQuery UI master with jQuery 1.4.3 is working fine for me.

Changed 7 years ago by unt01d

Attachment: autocomplete_ie8_bug.2.html added

comment:4 Changed 7 years ago by unt01d

Resolution: fixed
Status: closedreopened

Sorry, you're quite right - the conflict seems to be with scriptaculous, rather than prototype itself (see new attachment).

Is it possible to fix this?

comment:5 Changed 7 years ago by Scott González

Resolution: fixed
Status: reopenedclosed

This works fine if you load all of your jQuery code first, then load Prototype and Scriptaculous.

comment:6 Changed 7 years ago by Scott González

Milestone: 1.91.8.6

comment:7 Changed 7 years ago by unt01d

Resolution: fixed
Status: closedreopened

Apologies for constantly reopening, but I'm not sure this is the case. I get the exact same runtime error regardless of what order I load external libraries in (see new attachment).

Changed 7 years ago by unt01d

Attachment: autocomplete_ie8_bug.3.html added

comment:8 Changed 7 years ago by Scott González

Resolution: fixed
Status: reopenedclosed

This was fixed after 1.8.5.

comment:9 Changed 7 years ago by Scott González

Position: Use a better check for determining if an object is a window. Fixes #6201 - Autocomplete: Broken menu in IE8 Standards Mode when including prototype framework.

Changeset: eab0a6dac13b642a870747249a360bdddb39da99

Note: See TracTickets for help on using tickets.