Skip to main content

Bug Tracker

Side navigation

#9928 closed bug (worksforme)

Opened July 28, 2011 07:43AM UTC

Closed July 28, 2011 08:05PM UTC

Last modified August 01, 2011 02:43AM UTC

css selector reports wrong value for width

Reported by: RobertDeRose@gmail.com Owned by: RobertDeRose@gmail.com
Priority: low Milestone: None
Component: css Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Test on jQuery 1.6.2

if this === ​'ul' element

var originalList = $(this);

var pages = originalList.children();

var width = originalList.parent().'''''css('width');'''''

and it's parent === 'div style="width:100%"'

it returns 100px instead of 100%

tested against 1.5.2, and it does the correct thing and returns 100%

Attachments (0)
Change History (5)

Changed July 28, 2011 07:50AM UTC by anonymous comment:1

Changed July 28, 2011 01:23PM UTC by rwaldron comment:2

component: unfiledcss
owner: → RobertDeRose@gmail.com
priority: undecidedlow
status: newpending

Is this occurring in a particular browser? I can't reproduce it in Chrome: http://gyazo.com/e4817cb5bacd4b1c4ba4971fe84b2f17.png

Changed July 28, 2011 08:03PM UTC by RobertDeRose@gmail.com comment:3

status: pendingnew

That is the behavior that is unexpected... if the style sheet says 100% shouldn't it return 100% not the rendered pixel size?

in 1.5.2 it does return the 100% not the rendered pixel size.

If this was a documented change, I missed it, sorry

Changed July 28, 2011 08:05PM UTC by rwaldron comment:4

resolution: → worksforme
status: newclosed

jQuery normalizes all css property values into their pixel value.

Changed August 01, 2011 02:43AM UTC by rwaldron comment:5

#9945 is a duplicate of this ticket.