#312 ✓wont_fix
Mark Caudill

getStyle method differs for width/height

Reported by Mark Caudill | August 28th, 2008 @ 05:33 PM | in 1.7

I was looking around and I noticed that looking up width/height on IE/Opera (Element.Methods.getStyle) returns the offsetWidth/offsetHeight. There wouldn't be a specific problem with this except that Element.getStyle returns the CSS value of width/height.

I am in favor of the actual width/height being returned if available. If not, offsetWidth can be made closer to the actual width with taking into account available padding/border information.

Comments and changes to this ticket

  • John-David Dalton

    John-David Dalton August 28th, 2008 @ 06:53 PM

    • Milestone set to 1.7
    • State changed from “new” to “bug”
  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 02:18 AM

    • Tag changed from dimensions, needs_patch, needs_tests to needs_patch, needs_tests, section:dom

    [not-tagged:"dimensions" tagged:"section:dom" bulk edit command]

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 02:26 AM

    • Tag changed from needs_patch, needs_tests, section:dom to missing:tests, needs_patch, section:dom

    [not-tagged:"needs_tests" tagged:"missing:tests" bulk edit command]

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 02:28 AM

    • Tag changed from missing:tests, needs_patch, section:dom to missing:patch, missing:tests, section:dom

    [not-tagged:"needs_patch" tagged:"missing:patch" bulk edit command]

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 03:36 AM

    • Tag changed from missing:patch, missing:tests, section:dom to missing:patch, needs:tests, section:dom

    [not-tagged:"missing:tests" tagged:"needs:tests" bulk edit command]

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 03:37 AM

    • Tag changed from missing:patch, needs:tests, section:dom to needs:patch, needs:tests, section:dom

    [not-tagged:"missing:patch" tagged:"needs:patch" bulk edit command]

  • T.J. Crowder

    T.J. Crowder November 16th, 2009 @ 04:50 PM

    [responsible:none bulk edit command]

  • Andrew Dupont

    Andrew Dupont October 17th, 2010 @ 11:42 PM

    • State changed from “bug” to “wont_fix”
    • Importance changed from “” to “”

    Rather than make Element#getStyle more "magical" in its behavior, we introduced the Element.Layout class for measurement. So this is a wontfix because there's a new API that does exactly what you want.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Pages