Skip to main content

Bug Tracker

Side navigation

#13126 closed bug (wontfix)

Opened December 28, 2012 04:27AM UTC

Closed January 28, 2013 08:26PM UTC

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

Reported by: 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.


Attachments (0)
Change History (6)

Changed December 28, 2012 01:45PM UTC by dmethvin comment:1

cc: → mikesherov

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. 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.

Changed December 28, 2012 06:46PM UTC by mikesherov comment:2

component: unfiledcss
owner: → 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.

Changed December 28, 2012 07:10PM UTC by mikesherov comment:3

Changed January 06, 2013 11:54PM UTC by dmethvin comment:4

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

Changed January 07, 2013 12:11AM UTC by mikesherov comment:5

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

Changed January 28, 2013 08:26PM UTC by mikesherov comment:6

resolution: → wontfix
status: assignedclosed

Actually, I'm not going to patch this considering the webkit bug is almost fixed at this point: