Jquery drag and drop: Droppable does not work with elements with float: left or inline-block

Does anyone else have this problem?

It seems I can not get into TARGET, which has a display: inline-block or float: left.

Here is a link to sample code: http://jsbin.com/arusu3/141

Some information I found: http://forum.jquery.com/topic/connecttosortable-fails-when-sortable-list-is-floated

I noticed if INLINE can work if I reset it EXACTLY in the middle. but it would be nice if he accepted the fall, if some part of my touch touches.

+3
source share
2 answers

I was able to fall on a div-inline. (Using latest Chrome)

Perhaps this is a problem of tolerance?

    target.droppable({
        drop: function(event, ui) {
            alert('row dropped ' + $(this).text());
        },
        accept: source.selector,
        tolerance: 'touch'
    });

http://jsbin.com/arusu3/144:

http://jqueryui.com/demos/droppable/#option-tolerance

+9

float.

#your_sortable:after { clear:both; content:'.'; display:block; height:0; line-height:0; font-size:0; visibility:hidden; padding:0; margin:0; }
+2

All Articles