Bug Tracker

Opened 16 years ago

Closed 16 years ago

#1839 closed bug (fixed)

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

Change History (1)

comment:1 Changed 16 years ago by brandon

Resolution: fixed
Status: newclosed

Fixed in Rev [4100].

Note: See TracTickets for help on using tickets.