Skip to main content

Bug Tracker

Side navigation

#13956 closed bug (wontfix)

Opened May 28, 2013 08:04PM UTC

Closed September 30, 2013 04:47PM UTC

.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

Attachments (0)
Change History (6)

Changed May 28, 2013 08:10PM UTC by lolmaus comment:1

Also applies to Android and other Chromium-based browsers.

Changed June 01, 2013 05:52PM UTC by m_gol comment:2

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

Changed June 04, 2013 06:02PM UTC by m_gol comment:3

milestone: None1.11/2.1

Changed June 14, 2013 06:16AM UTC by b1lly comment:4

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

Changed June 14, 2013 06:41AM UTC by b1lly comment:5

Changed September 30, 2013 04:47PM UTC by mikesherov comment:6

keywords: → blinkBroken
resolution: → wontfix
status: assignedclosed