Skip to content

Commit

Permalink
Draggable: Apply ui-draggable-dragging class prior to calculating dim…
Browse files Browse the repository at this point in the history
…ensions. Fixes #8349 - Draggable: Incorrect dimensions used if .ui-draggable-dragging changes dimensions

(cherry picked from commit a0c18ea)
  • Loading branch information
non4eg authored and scottgonzalez committed May 24, 2012
1 parent f6019da commit 168a21d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/jquery.ui.draggable.js
Expand Up @@ -103,6 +103,8 @@ $.widget("ui.draggable", $.ui.mouse, {
//Create and append the visible helper
this.helper = this._createHelper(event);

this.helper.addClass("ui-draggable-dragging");

//Cache the helper size
this._cacheHelperProportions();

Expand Down Expand Up @@ -163,7 +165,7 @@ $.widget("ui.draggable", $.ui.mouse, {
if ($.ui.ddmanager && !o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this, event);

this.helper.addClass("ui-draggable-dragging");

this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position

//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
Expand Down

0 comments on commit 168a21d

Please sign in to comment.