Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12711 closed bug (notabug)

$.css work with bug in FF 16

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


try get $(elem).css("some_css_prop"). All browsers return null if prop doesn't set. But FF 16 return "none" if prop doesn't set.

There are some troubles with it in plugins.

example: var t = $(elem).css("transition")
new Transition();

!!"none" === true

Change History (1)

comment:1 Changed 10 years ago by mikesherov

Resolution: notabug
Status: newclosed

Thanks for contributing! Unfortunately, that's just not true. Browsers will return "resolved values" for known properties from a getComputedStyle call: http://dev.w3.org/csswg/cssom/#resolved-values . If the property doesn't exist, that value will be an empty string which gets transformed to null. It may have been coincidence that it *appeared* as if jQuery was returning null for properties that aren't set.

"None" has different meaning in different contexts. For example, display:none isn't the same as display:"" and is not something we'll normalize.

For these reasons, I'm closing this ticket as "notabug".

Note: See TracTickets for help on using tickets.