Skip to main content

Bug Tracker

Side navigation

#1839 closed bug (fixed)

Opened October 23, 2007 08:07PM UTC

Closed December 11, 2007 04:45AM UTC

Error in width() method

Reported by: jeffkretz Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:
Description

I've put up a test page to show this:

http://www.scorpiontechnology.com/Cobalt/widthtest.htm

When width is calculated on a hidden element, it is cloned, CSS is modified and the width is recalculated. In this example, the width is being calculated incorrectly.

Hover over the last item on the menu (with the flyout triangle), the child flyout appears, and the counter box on the right shows three values:

1. The .width() method called directly.

2. An extracted portion of the width() which is doing the math.

3. A modified version of this same code.

Note that the modified version is the only version which is returning the correct width of the hidden div element. This holds true for IE7, FF, Opera and Safari 2. Note that for whatever reason, IE6 doesn't have this same problem.

What I did was remove the Left and Top css attributes and just had it assign the visiblity, position and display attributes. You can see this in the source code on the page.

I'm not sure if omitting the left and top would impact something else, but this should be reviewed as the code in its current state isn't accurate.

JK

Attachments (0)
Change History (1)

Changed December 11, 2007 04:45AM UTC by brandon comment:1

resolution: → fixed
status: newclosed

Fixed in Rev [4100].