Opened 12 years ago
Closed 10 years ago
#6871 closed bug (wontfix)
Draggable: helper won't revert to original position if the original item was removed during the drag
Reported by: | cburgdorf | Owned by: | mikesherov |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.draggable | Version: | 1.8.8 |
Keywords: | regression | Cc: | |
Blocked by: | Blocking: |
Description
If you have a draggable set to "helper: clone" and "revert: invalid" it won't revert to the original position if the original element has disappeared in the meantime.
You can spot this behaviour using the red square in this fiddle. You can spot what normally happens when the original element stays there (blue square).
http://jsfiddle.net/cburgdorf/YSEAs/
For me, it feels wrong. I think the helper should revert back to the original position and after that disappear just like the original element.
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Draggable: Incase helper is not set to 'original' succeed with revert action even if the original element has been removed. Fixes #6871
Changeset: 0ed452bf2581a83781c417dffe6ed4e3dbe2d676
comment:3 Changed 12 years ago by
Milestone: | 1.9 → 1.8.9 |
---|
comment:4 Changed 11 years ago by
Milestone: | 1.8.9 → 2.0.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | draggable helper won't revert to original position if the original item has disappeared in the meantime → Draggable: helper won't revert to original position if the original item was removed during the drag |
This bug are now present again in 1.9: http://jsfiddle.net/EcwyG/
comment:5 Changed 11 years ago by
Status: | reopened → open |
---|
comment:6 Changed 10 years ago by
Keywords: | regression added |
---|---|
Owner: | set to mikesherov |
Status: | open → assigned |
The regression here was caused by https://github.com/jquery/jquery-ui/commit/4da1716cfd88ac9b4a8362f715c081c2f75bd316
removing the original calls _destroy, which had a guard clause to not call _mouseDestroy if the original was removed.
In order to correct this behavior, we need to add the guard clause back in and then cause _mouseDestroy to be called after the revert action happens, or something similar. @scott.gonzalez, any thoughts on what correct behavipr here should be?
comment:8 Changed 10 years ago by
Milestone: | 2.0.0 → 1.11.0 |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
even though we've previously patched this, I've discussed this with scott_gonzalez and it's not something we're going to support going forward. We're only going to support removing the original on "end" callbacks. In this case, that's "stop" for draggables. I'll open a docs issue shortly to document this.
I forgot to say. I would love to provide a fix for that myself as long we agree that the current behavour is wrong.