mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: Apply ui-draggable-dragging class prior to calculating dimensions. Fixes #8349 - Draggable: Incorrect dimensions used if .ui-draggable-dragging changes dimensions
This commit is contained in:
parent
db9a015485
commit
a0c18ea250
4
ui/jquery.ui.draggable.js
vendored
4
ui/jquery.ui.draggable.js
vendored
@ -102,6 +102,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();
|
||||
|
||||
@ -162,7 +164,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)
|
||||
|
Loading…
Reference in New Issue
Block a user