#316 ✓invalid
dave mankoff

Element.absolutize() Does Not Always Return element

Reported by dave mankoff | August 29th, 2008 @ 07:47 PM

The second line of Element.absolutize() returns undefined instead of $(element). The bottom of the function returns correctly.


2029 absolutize: function(element) {
2030 element = $(element);
2031 if (element.getStyle('position') == 'absolute') return; // <<-- PROBLEM SPOT
2032 // Position.prepare(); // To be done manually by Scripty when it needs it.
2033
2034 var offsets = element.positionedOffset();
2035 var top = offsets[1];
2036 var left = offsets[0];
2037 var width = element.clientWidth;
2038 var height = element.clientHeight;
2039
2040 element._originalLeft = left - parseFloat(element.style.left || 0);
2041 element._originalTop = top - parseFloat(element.style.top || 0);
2042 element._originalWidth = element.style.width;
2043 element._originalHeight = element.style.height;
2044
2045 element.style.position = 'absolute';
2046 element.style.top = top + 'px';
2047 element.style.left = left + 'px';
2048 element.style.width = width + 'px';
2049 element.style.height = height + 'px';
2050 return element;
2051 },

Comments and changes to this ticket

  • Juriy Zaytsev

    Juriy Zaytsev August 29th, 2008 @ 08:19 PM

    • State changed from “new” to “invalid”

    Thanks for report. This is fixed in a trunk. Closing as invalid.

  • Tobie Langel

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

    • Tag changed from bug, element, function, needs_patch, position to element, needs_patch, position, section:lang

    [not-tagged:"function" tagged:"section:lang" bulk edit command]

  • Tobie Langel

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

    • Tag changed from element, needs_patch, position, section:lang to element, needs_patch, position, section:dom, section:lang

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

  • Tobie Langel

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

    • Tag changed from element, needs_patch, position, section:dom, section:lang to needs_patch, position, section:dom, section:lang

    [not-tagged:"element" bulk edit command]

  • Tobie Langel

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

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

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

  • Tobie Langel

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

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

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

  • Tobie Langel

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

    • Tag changed from needs:patch, position, section:dom, section:lang to needs:patch, section:dom, section:lang

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

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

People watching this ticket

Pages