Bug Tracker

Opened 13 years ago

Closed 12 years ago

#1629 closed enhancement (fixed)

.width() and .height() flickering and inefficiency

Reported by: arrix Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2
Keywords: Cc:
Blocked by: Blocking:

Description

.width() and .height() are probably the most useful functions in complex UI programming. But there are some annoying defects

  1. resetting borderWidth/Height and paddingWidth/Height causes flickers. see #1613
  2. changing the css position of the parent elements in certain cases cause undesired side effects. e.g. #1415
  3. cloning invisible elements could be inefficient, especially when the element has many descendants

for # 1, I suggest we minus the padding/border from client/offsetWdith/Height.

for # 2, I'm not sure why the position:relative is needed. if it were to gain layout in IE, then I would suggest zoom:1

for # 3, I suggest we move the element off screen and make it visible instead of cloning.

Attachments (3)

core.diff (1.9 KB) - added by brandon 12 years ago.
A possible patch
jquery_test.html (2.7 KB) - added by davidserduke 12 years ago.
test case demo'ing an error in Opera that this patch reveals
1629.diff (2.0 KB) - added by davidserduke 12 years ago.
new proposed patch

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by brandon

Milestone: 1.2.11.2.2

Changed 12 years ago by brandon

Attachment: core.diff added

A possible patch

comment:2 Changed 12 years ago by brandon

This passes the test suite except in Opera where a couple of fx tests fail but if you run the failed tests individually, they pass. I haven't done much testing outside the test suite.

Changed 12 years ago by davidserduke

Attachment: jquery_test.html added

test case demo'ing an error in Opera that this patch reveals

Changed 12 years ago by davidserduke

Attachment: 1629.diff added

new proposed patch

comment:3 Changed 12 years ago by brandon

Resolution: fixed
Status: newclosed

Fixed in Rev [4100].

Note: See TracTickets for help on using tickets.