Skip to main content

Search and Top Navigation

#6746 closed bug (notabug)

Opened December 13, 2010 09:55PM UTC

Closed December 13, 2010 10:12PM UTC

Last modified December 13, 2010 11:06PM UTC

Autocomplete: _resizeMenu raises exception in IE7

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

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.

Attachments (0)
Change History (5)

Changed December 13, 2010 10:00PM UTC by james.a.rosen@gmail.com comment:1

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

http://img.skitch.com/20101213-dqxbdeadw3teat24qmcyd5hfg7.png

Changed December 13, 2010 10:12PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

Closing as invalid unless you can provide a test case.

Changed December 13, 2010 10:16PM UTC by james.a.rosen@gmail.com comment:3

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.

https://github.com/jamesarosen/jquery-ui/tree/autocomplete_width

Changed December 13, 2010 11:02PM UTC by james.a.rosen@gmail.com comment:4

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.

Changed December 13, 2010 11:06PM UTC by james.a.rosen@gmail.com comment:5

It is directly related to http://bugs.jquery.com/ticket/6088