diff options
author | Viktar Varvanovich <non4eg@gmail.com> | 2012-05-24 14:30:55 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-05-24 14:33:36 -0400 |
commit | 168a21d5ef3e0df0f03aa860ae798a8f7de35210 (patch) | |
tree | ee6b7ed989fb7092285f8fcb95fe0c339156f17a | |
parent | f6019dad4d523dd89b55800aec47e601fbd20c1c (diff) | |
download | jquery-ui-168a21d5ef3e0df0f03aa860ae798a8f7de35210.tar.gz jquery-ui-168a21d5ef3e0df0f03aa860ae798a8f7de35210.zip |
Draggable: Apply ui-draggable-dragging class prior to calculating dimensions. Fixes #8349 - Draggable: Incorrect dimensions used if .ui-draggable-dragging changes dimensions
(cherry picked from commit a0c18ea25086ed07634baff5b4fea46e69aad38e)
-rw-r--r-- | ui/jquery.ui.draggable.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 32a753ead..7e2aea56d 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -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(); @@ -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) |