Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11621 (new defect)

Opened 1 week ago

script.aculo.us Sortable.create drops draggable despite option.only; onUpdate (correctly) not called

Reported by: AMA3 Assigned to: madrobby
Priority: normal Milestone: 2.x
Component: script.aculo.us Version: edge
Severity: normal Keywords: Sortable.create option.only drag drop containment revert
Cc:

Description

SCENARIO:

I have two types of Sortables that share Draggables (by containment):

(1) a "groupDrop" can contain only Draggable "field" elements.

(2) a "zone" can contain Draggable "field" elements and/or Draggable "group" elements.

A Sortable "groupDrop" is always within a Draggable "group".

Each "groupDrop" has option only:"field" to prevent one group from being dropped within another.

PROBLEM:

If a "group" is dragged from a "zone" and dropped in a "groupDrop", the groupDrop correctly does not invoke the onUpdate function. However, the group incorrectly drops in the groupDrop, and the zone onUpdate function is invoked (and missing the dragged group).

If a "groupDrop" is set to only accept a "field", then any attempt to drop a "group" in it should fail completely. The "group" should revert back to its original position.

Attachments

ticket11621.html (2.9 kB) - added by AMA3 on 05/03/08 22:47:26.
demonstration of problem (place this file in ~scriptaculous/src)

Change History

05/03/08 22:47:26 changed by AMA3

  • attachment ticket11621.html added.

demonstration of problem (place this file in ~scriptaculous/src)