#241 new
Steve Eppley

Sortable bug with IE7: After item is dragged away, other draggables fail to close gap.

Reported by Steve Eppley | September 9th, 2009 @ 06:32 AM

The attached html appears to work okay using Scriptaculous 1.8.2 with Firefox 3.5, but not with IE7.

Summary: The html's purpose is to let the user rearrange items into a non-strict (a.k.a. nonlinear) ordering. (A non-strict ordering allows multiple items to be at the same position. See the html for 2 use cases.) Sortable.create is called 3 times to set up 3 droppable slots. Initially the top two slots are empty and the bottom slot contains draggable items.

Here's the bug: With IE7, when an item is dragged up out of the bottom slot to be dropped into a higher slot, the higher slot correctly becomes taller to make room for it and the bottom slot correctly shortens by the same amount. But as the bottom slot shortens, some of the items remaining in the bottom slot incorrectly move downward, instead of staying put to eliminate the gap left by the item dragged away. (The bottommost of those other items moves outside--below--the bottom slot--ugly!--and a gap between items remains--also ugly!)

Here's another bug: There also appears to be an IE7 issue with the z-index of the item being dragged. To see this, first drag&drop an item into one of the upper slots. Then slowly drag it back down. As it reaches and begins to enter a lower slot, part of it hides behind the lower slot. (It reappears when the item is dragged further.) This seems to happen only when dragging downward.

The attached html is just a crude early version. There's a lot of work to do: When fully developed, it must automatically insert a new slot between existing slots whenever an item is dragged out of a non-empty slot, so the user can position the item between the positions of the items above & below, and it must automatically delete slots as they become empty. (Also, I hope to figure out the "float" css--or whatever--that will let items fit more compactly into slots--not constrained to just the vertical dimension. But this feature isn't as crucial.)

It would be nice if non-strict sorting were built into Scriptaculous. I expect the voting scenario will become very significant, since the best voting methods (e.g., Maximize Affirmed Majorities) allow each voter to rank the alternatives in a non-strict order of preference.

By the way, should we be concerned that Scriptaculous 1.8.3 is already nine months overdue and many old tickets haven't been fixed? Or does that just mean the release of version 2 is imminent? :-)

Best wishes,
Steve

Comments and changes to this ticket

  • Steve Eppley

    Steve Eppley September 9th, 2009 @ 05:50 PM

    Oh, one more thing. In the html attached above, the z-index style for .item was just a clumsy attempt to solve the IE7 z-index issue. (It didn't succeed.) --Steve

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

Attachments

Pages