Bug Tracker

Ticket #1629 (closed enhancement: fixed)

Opened 1 year ago

Last modified 10 months ago

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

Reported by: arrix Assigned to: anonymous
Type: enhancement Priority: major
Milestone: 1.2.2 Component: core
Version: 1.2 Keywords:
Cc: Needs: Review

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

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

Change History

Changed 1 year ago by brandon

  • milestone changed from 1.2.1 to 1.2.2

Changed 10 months ago by brandon

A possible patch

Changed 10 months 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 10 months ago by davidserduke

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

Changed 10 months ago by davidserduke

new proposed patch

Changed 10 months ago by brandon

  • status changed from new to closed
  • resolution set to fixed

Fixed in Rev [4100].

Note: See TracTickets for help on using tickets.