Bug Tracker

Opened 12 years ago

Closed 11 years ago

#9233 closed bug (fixed)

getPixelVaue method in jquery

Reported by: [email protected] Owned by: timmywil
Priority: low Milestone: 1.next
Component: css Version: 1.6
Keywords: Cc:
Blocked by: Blocking:


hi: in jquery 1.6, I think this has a bug

rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ]

in jquery 1.4, this is

rsLeft = elem.runtimeStyle.left;

jquery 1.6 line #6422 jquery 1.4.3 line #5244

Change History (7)

comment:1 Changed 12 years ago by addyosmani

Component: unfiledmisc
Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket!

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 in reply to:  1 Changed 12 years ago by [email protected]

Status: pendingnew

please run it in IE(my browser is version 8).


comment:3 Changed 12 years ago by timmywil

Component: misccss
Owner: changed from [email protected] to timmywil
Priority: undecidedlow
Status: newassigned

I can't think of a use case where that would cause something to break, but I'll take a look as to why it's changing the runtime value.

comment:4 Changed 11 years ago by mikesherov

Looks like the change here had some copypasta: https://github.com/jquery/jquery/commit/8099cdce800d45109b961e3521fc0080e9a876c6

I'll open a PR just in case we care to fix this.

comment:6 Changed 11 years ago by Rick Waldron

Nope, no copypasta there, everything I did was intentional. If you'd like to discuss my changes line-by-line, I'd be glad to. The problem was runtimeStyle throwing exceptions in Opera, but clearly we had no tests for cases like this. (see: #7608 )

TBH, that fiddle feels contrived...

comment:7 Changed 11 years ago by Mike Sherov

Resolution: fixed
Status: assignedclosed

Landing pull request 562. Make sure runtimeStyle isn't affected by dimensions. Fixes #9233.

More Details:

Note: See TracTickets for help on using tickets.