jQuery UI Draggable and IE8

An interesting fact: if you use jQueryUI draggable on two DIVs one of which is contained in the other, interesting things can happen. If you start to drag the inner DIV, Firefox and Opera behaves as expected: only the inner DIV starts to follow the mouse. IE, however, starts to drag both DIVs, which results in the parent DIV following the mouse, and the child DIV moving twice as far as the mouse from the original location.

A solution to this problem can be to bind an event handler to the mousedown event on the child DIV, and stop event propagation.

Popular Posts