aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.draggable.js
diff options
context:
space:
mode:
authorBen Higgins <ben@extrahop.com>2014-01-13 14:51:06 -0800
committerTJ VanToll <tj.vantoll@gmail.com>2014-01-20 13:08:12 -0500
commit0bb807bb42af87bf4c6dd4d71808b12c08d316e7 (patch)
treedaa5c1e023248b819fd831884bfb1cb85816e091 /ui/jquery.ui.draggable.js
parent998d04d55d4d1da2a9e24eea285349d388a6d0fc (diff)
downloadjquery-ui-0bb807bb42af87bf4c6dd4d71808b12c08d316e7.tar.gz
jquery-ui-0bb807bb42af87bf4c6dd4d71808b12c08d316e7.zip
Draggable: fix changing containment
If containment was set such that relative_container is set by _setContainment, and then containment changes to e.g. "document", "window", or an array, relative_container would not be unset, causing incorrect containment of the draggable. Add a unittest to check that containment with an array works after previously being set to "parent". Fixes #9733 Closes gh-1176
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r--ui/jquery.ui.draggable.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 5cbe92fce..2de1d0162 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -420,6 +420,8 @@ $.widget("ui.draggable", $.ui.mouse, {
o = this.options,
document = this.document[ 0 ];
+ this.relative_container = null;
+
if ( !o.containment ) {
this.containment = null;
return;