#309 new

scriptaculous : prototype bug : revert on drag element return to bad location

Reported by immobilia | January 5th, 2011 @ 08:09 PM

When using "revert" option on Draggable,
the draggable item return on bad location (except if you add on div draggable element style="position: absolute" or style="position: absolute")

work :

  • prototype.js 1.7 (last) + scriptaculous.js 1.8.3 (previous)
  • prototype.js 1.6.1 (previous) + scriptaculous.js 1.9 (last)

not working :

  • full scriptaculous.js 1.9 : prototype.js 1.7 + scriptaculous.js 1.9

The cause is the last prototype.js with the last scriptaculous.js ?

Comments and changes to this ticket

  • immobilia

    immobilia January 6th, 2011 @ 09:20 AM

    If you donwload last scriptaculous, you can see problem with demo included: dragdrop4_test

  • infringer

    infringer July 1st, 2011 @ 10:33 PM

    • Assigned user set to “ronin-15560 (at lighthouseapp)”

    I use drag/drop alot in my app. And this is a major hindrance.

    The elements always reposition to position: absolute; top: 0; left: 0;

    Would be nice to get this fixed.


  • infringer

    infringer July 1st, 2011 @ 10:47 PM

    I solved the problem myself it was a prototype issue.

    Prototype.js line 3793 you will find:

    element.store('prototype_absolutize_original_styles', {
      left:   element.getStyle('left'),
      top:    element.getStyle('top'),
      width:  element.getStyle('width'),
      height: element.getStyle('height')

    change it to

    element.store('prototype_absolutize_original_styles', {
      left:   element.getStyle('left'),
      top:    element.getStyle('top'),
      width:  element.getStyle('width'),
      height: element.getStyle('height'),
      position: element.getStyle('position')

    hope that helps others

  • Ben Perry

    Ben Perry July 13th, 2011 @ 02:42 PM

    Thanks for that fix as it now works for Firefox 4.0+ and IE9, but not for Chrome.

    Ah the joys of cross browser support :)

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 ยป

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.
<br/><b>Source available from github</b>
The Git repository resides at:
<a href="http://github.com/madrobby/scriptaculous">http://github.com/madrobby/scriptaculous</a>
<br/>Check out the current development trunk with:
<code>git clone git://github.com/madrobby/scriptaculous.git</code>
<br/>As <b>script.aculo.us 1.xx is feature-frozen</b>, this development trunk is for <b>bugfixes only</b>.
<br/>New development should happen only for
<b>script.aculo.us 2</b>.
<br/><b>Creating a bug report</b>
When creating a bug report, be sure to include as much relevant information as possible. Post a an example that shows off the problem. Preferably, <b>alter the unit tests</b> and show through either changed or added tests how the expected behavior is not occuring.

People watching this ticket