Search and Top Navigation
#8459 closed bug (fixed)
Opened July 24, 2012 07:57PM UTC
Closed March 16, 2013 06:37PM UTC
Last modified April 17, 2013 03:48PM UTC
Draggable: element can snap to an element that was removed during drag
Reported by: | jmelis | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.3 |
Component: | ui.draggable | Version: | 1.8.22 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi,
didn't found any related discussion on the trac, nor in web search.
The issue is :
if you remove an element "snappable" during a drag (with ui.draggable), it is still possible to snap to it, even if it has gone away.
if you drop, then drag again, it's ok because the element was removed BEFORE the drag init.
Expected behavior :
as the element is not there anymore, we should not be able to snap to its old place.
What happens ?
I know nothing about UI source code but I guess calculations for snapping are made before the 'start' event is fired ; so if we remove the snapping element in this callback, it's too late !
...and of course I'm not telling about if we try to remove elements while dragging.
Reproducible : always
Way to reproduce : http://jsfiddle.net/jmelis/vk3Xh/
More information on my environment :
- Firefox 10.0.5
- Linux 3.3.8/64bits on KDE 4.8.3
- jQuery 1.7.2, UI 1.8.21 (issue reproduce with 1.8.18 inside jsfiddle)
- I've also tried new UI version 1.8.22 => same issue
Btw, I'm pretty sure that the environment doesn't balance in here.
Attachments (0)
Change History (7)
Changed October 11, 2012 02:49PM UTC by comment:1
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 28, 2012 07:48PM UTC by comment:2
status: | new → open |
---|---|
summary: | draggable can snap a removed element → draggable: element can snap to an element that was removed during drag |
Changed November 09, 2012 01:44PM UTC by comment:3
summary: | draggable: element can snap to an element that was removed during drag → Draggable: element can snap to an element that was removed during drag |
---|
Changed March 16, 2013 06:37PM UTC by comment:4
resolution: | → fixed |
---|---|
status: | open → closed |
Draggable: make sure snap elements are in the document before snapping. Fixes #8459 - Draggable: element can snap to an element that was removed during drag.
Changeset: 9d8af804ad4cebe434d420b29467c596809a7cca
Changed March 16, 2013 06:37PM UTC by comment:5
milestone: | 2.0.0 → 1.11.0 |
---|
Changed April 17, 2013 03:48PM UTC by comment:6
Draggable: make sure snap elements are in the document before snapping. Fixes #8459 - Draggable: element can snap to an element that was removed during drag.(cherry picked from commit 9d8af804ad4cebe434d420b29467c596809a7cca)
Changeset: ecabe4754412b61059d429040e266ca921a754b2
Changed April 17, 2013 03:48PM UTC by comment:7
milestone: | 1.11.0 → 1.10.3 |
---|