Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13126 closed bug (wontfix)

css('float') is different when element is static,absolute,fixed in different browsers

Reported by: [email protected] Owned by: mikesherov
Priority: low Milestone: None
Component: css Version: 1.8.2
Keywords: Cc: mikesherov
Blocked by: Blocking:


$(el).css('float') is different in different browsers when element is absolute or fixed. If element is floated left and an absolute position, $(el).css('float') returns "left" in Chrome but "none" in all other major (up-to-date) browsers.

example: http://jsfiddle.net/ChPCD/7/

Change History (6)

comment:1 Changed 10 years ago by dmethvin

Cc: mikesherov added

Looks like a Chrome bug to me. Have you reported it in their bug tracker? I didn't see it or anything like it in a search. http://code.google.com/p/chromium/issues/list

http://www.w3.org/TR/css3-positioning/ Section 8:

if ‘position’ has the value absolute, page or fixed, and the value of float is left or right, the box is absolutely positioned and the computed value of float is none.

In any case there's a simple workaround, not sure it's worth a special case inside jQuery for this but looping in mikesherov for his opinion.

comment:2 Changed 10 years ago by mikesherov

Component: unfiledcss
Owner: set to mikesherov
Priority: undecidedlow
Status: newassigned

Definitely a WEBKIT bug, as it's in Safari too. Good catch. Float's resolved value is it's computed value, so this should return none. It would be pretty easy for us to pave over this with a cssHook if you guys think it's worth it. I'm guessing 20 bytes or so. @dmethvin, thoughts?

I'll check webkit for a bug report and submit if not.

comment:4 Changed 10 years ago by dmethvin

@mikesherov, do you want to try a patch for this? I'm okay with a wontfix as well, it's a pretty rare case.

comment:5 Changed 10 years ago by mikesherov

Ill patch it. We need SOME patches now that oldIE is gone :P

comment:6 Changed 10 years ago by mikesherov

Resolution: wontfix
Status: assignedclosed

Actually, I'm not going to patch this considering the webkit bug is almost fixed at this point: https://bugs.webkit.org/show_bug.cgi?id=105836


Note: See TracTickets for help on using tickets.