Ticket #6201 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 4 years ago by unt01d

comment:1 Changed 4 years ago by scott.gonzalez

  • Status changed from new to closed
  • Summary changed from Issue with autocomplete in IE8 Standards Mode when including prototype framework to Autocomplete: Broken menu in IE8 Standards Mode when including prototype framework
  • Resolution set to fixed
  • Milestone changed from TBD to 1.9

Fixed in  eab0a6d. Requires jQuery 1.4.3 for correct width.

comment:2 Changed 4 years ago by unt01d

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 4 years ago by scott.gonzalez

  • Status changed from reopened to closed
  • Resolution set to fixed

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 4 years ago by unt01d

comment:4 Changed 4 years ago by unt01d

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 4 years ago by scott.gonzalez

  • Status changed from reopened to closed
  • Resolution set to fixed

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

comment:6 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.6

comment:7 Changed 4 years ago by unt01d

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 4 years ago by unt01d

comment:8 Changed 4 years ago by scott.gonzalez

  • Status changed from reopened to closed
  • Resolution set to fixed

This was fixed after 1.8.5.

comment:9 Changed 4 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.