Bug Tracker

Modify

Ticket #9598 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

width() does offsetWidth fallback unnecessarily if width=0 but padding or border > 0

Reported by: mikesherov Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: git
Keywords: Cc:
Blocking: Blocked by:

Description

In the latest updates, significant changes were made to cssHooks for width and height to address #9300 . However, it unnecessarily falls back from offsetWidth calculations when the width of the element is 0 and the padding or border is greater than 0.

The check if offsetWidth > 0 should happen before padding and border are stripped out.

Change History

comment:2 Changed 3 years ago by Mike Sherov

  • Status changed from new to closed
  • Resolution set to fixed

Landing pull request 413. Move border/padding checks to after width validation to avoid unnecessary fallbacks. Fixes #9598.

More Details:

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.