Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13956 closed bug (wontfix)

.css('right') returns percentage value in Chrome

Reported by: lolmaus Owned by: m_gol
Priority: low Milestone: 1.11/2.1
Component: css Version: 2.0.1
Keywords: blinkBroken Cc:
Blocked by: Blocking:

Description

Hi.

.foo {
  background-color: pink;
  position: absolute;
  left: 25%;
  right: 25%;
}
$(document).ready(function() {

  $foo = $('.foo');

  console.log(
    $foo.css('left'),
    $foo.css('right')
  );
  
});

Result in Chrome: 100.25px 25%. Result in Firefox: 69.75px 69.75px (different window width).

Chrome latest stable 27.0.1453.94 m on Win7-x64.

Demo: http://jsbin.com/utahuf/4/edit

Change History (6)

comment:1 Changed 6 years ago by lolmaus

Also applies to Android and other Chromium-based browsers.

comment:2 Changed 6 years ago by m_gol

Component: unfiledcss
Owner: set to m_gol
Priority: undecidedlow
Status: newassigned
Version: 2.0b22.0.1

Confirmed. http://jsfiddle.net/Mu2Sk/1

We need to apply special hooks for right & bottom, too, not only top & left.

comment:3 Changed 6 years ago by m_gol

Milestone: None1.11/2.1

comment:4 Changed 6 years ago by b1lly

Hey, I'm a new contributor. I made a fix but I must've trimmed whitespace or something and screwed up the commit into my repository. I know I need to fix this, but anyway, lines 505-525 in my commit should fix this.

https://github.com/b1lly/jquery/commit/1494f2a150c9bfd179573181d8fbb231256af605

Can you please advise me abit on how to get this into a review process for jQuery? I know I have to create a pull request, but I just wanted to make sure that the changes I was making are in the right direction of the solution.

I'm going to fix my editor and try to recompile tomorrow...a bit tired now.

Thanks

comment:6 Changed 6 years ago by mikesherov

Keywords: blinkBroken added
Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.