From 6b36f6afe2f6baef12609abae593a178d66e0df7 Mon Sep 17 00:00:00 2001 From: vadim velezh Date: Fri, 29 Dec 2023 20:38:45 +0200 Subject: [PATCH] Draggable: Set containment size after helper size change --- ui/widgets/draggable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/widgets/draggable.js b/ui/widgets/draggable.js index 0307fb8e838..6934222931d 100644 --- a/ui/widgets/draggable.js +++ b/ui/widgets/draggable.js @@ -208,15 +208,15 @@ $.widget( "ui.draggable", $.ui.mouse, { this._adjustOffsetFromHelper( o.cursorAt ); } - //Set a containment if given in the options - this._setContainment(); - //Trigger event + callbacks if ( this._trigger( "start", event ) === false ) { this._clear(); return false; } + //Set a containment if given in the options + this._setContainment(); + //Recache the helper size this._cacheHelperProportions();