Dhanan
Dhanan

Reputation: 207

jQuery-UI Draggables in IE8 fail after first `return false;`

I need to set up a specific area to allow dragging. At the moment, I'm setting it up as follows:

dragthis.draggable({
    drag: function(event, ui) {
        if (ui.position.left < 0) {
            return false;
        } else {
            return true;
        }
    }
});

The return false; works as expected for IE8, but afterward dragging doesn't work. What am I doing wrong?

Upvotes: 1

Views: 117

Answers (1)

kevinnuut
kevinnuut

Reputation: 116

Have you tried using the containment options instead to constrain movement?

http://jqueryui.com/draggable/#constrain-movement

http://api.jqueryui.com/draggable/#option-containment

Upvotes: 2

Related Questions