Bug Tracker

Modify

Ticket #9233 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

getPixelVaue method in jquery

Reported by: zhengzongyi@… Owned by: timmywil
Priority: low Milestone: 1.next
Component: css Version: 1.6
Keywords: Cc:
Blocking: Blocked by:

Description

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

comment:1 follow-up: ↓ 2 Changed 3 years ago by addyosmani

  • Owner set to zhengzongyi@…
  • Status changed from new to pending
  • Component changed from unfiled to misc

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 3 years ago by zhengzongyi@…

  • Status changed from pending to new

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

 http://jsfiddle.net/eF4YQ/

comment:3 Changed 3 years ago by timmywil

  • Owner changed from zhengzongyi@… to timmywil
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from misc to css

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 2 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 2 years ago by rwaldron

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 2 years ago by Mike Sherov

  • Status changed from assigned to closed
  • Resolution set to fixed

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

More Details:

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.