Bug Tracker

Modify

Ticket #10786 (closed bug: cantfix)

Opened 2 years ago

Last modified 2 years ago

Width is inconsistant with node isn't in the document

Reported by: dsmlover@… Owned by:
Priority: low Milestone: None
Component: css Version: 1.7
Keywords: Cc:
Blocking: Blocked by:

Description

If I do .width() on an element that is not attached to the document where the width is set by a css class chrome returns 0 and firefox returns the correct width.

 http://jsfiddle.net/X8hqd/4/

I don't know if jQuery should be responsible but it should be known.

Change History

comment:1 Changed 2 years ago by rwaldron

I'm certain this is a duplicate, but I can't find the original ticket.

comment:2 Changed 2 years ago by rwaldron

  • Component changed from unfiled to css

comment:3 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Status changed from new to closed
  • Resolution set to cantfix

It must be kept in mind that .css is for retrieving _computed_ values. Both webkit and firefox (and every browser) return 0 for the computed width of disconnected, as they should. An element that is not connected cannot have width. We provide fallbacks to uncomputed styles where they are available, but on a disconnected node with no inline styles, there are no uncomputed styles to fall back to, at least in webkit.

Version 0, edited 2 years ago by timmywil (next)

comment:4 Changed 2 years ago by anonymous

If that is the case I believe we should not provide those fallbacks then. Just like we are removing layerX and layerY because it doesn't work across browsers I think this should be removed too.

Thanks for your time.

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.