Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6746 closed bug (notabug)

Autocomplete: _resizeMenu raises exception in IE7

Reported by: james.a.rosen@… Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:


I am running the combobox autocomplete example (with a few changes to the way data is parsed) in IE7 and I get an exception in _resizeMenu. The problem is that the call to ul.width( "" ) is returning the element's width rather than the object itself for chaining. Thus, the subsequent call to width() raises an exception as numbers don't have that method.

I've tried to replicate this in a very limited manner but cannot. It _may_ have something to do with my CSS and/or a hasLayout issue. The only other information I can provide at this point is that when the call does succeed, the menu has an extremely large width -- as large as the window at least -- and thus goes partially off the screen to the right.

I am using jQuery 1.4.2 on IE7 with Developer Toolbar installed.

Change History (5)

comment:1 Changed 10 years ago by james.a.rosen@…

Attached is a screenshot of the debugger console. Notice that the watch expression (this.width("")) returns a long.

comment:2 Changed 10 years ago by Scott González

Resolution: invalid
Status: newclosed

Closing as invalid unless you can provide a test case.

comment:3 Changed 10 years ago by james.a.rosen@…

This branch of my fork of jQuery-UI fixes the issue, but it's more of a hack than a fix. I'd prefer to figure out why width( "" ) is returning the wrong thing.

comment:4 Changed 10 years ago by james.a.rosen@…

I've tried again and failed to come up with a succinct example, but I have some more information.

When using jQuery 1.4.2 (which uses ("scrollTo" in elem && elem.document) to check whether the object is a window), I get the above broken behavior. Upgrading to jQuery 1.4.4, which defines jQuery.isWindow as (obj && typeof obj === "object" && "setInterval" in obj), the problem is fixed.

comment:5 Changed 10 years ago by james.a.rosen@…

It is directly related to

Note: See TracTickets for help on using tickets.