From c278a4461b399c5b84abf4e03c1d902bfd130441 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sat, 12 Jan 2013 00:33:45 -0500 Subject: Draggable Tests: Add test coverage for supported options --- ui/jquery.ui.draggable.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ui/jquery.ui.draggable.js') diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 27b6b4ef0..7c1fb3361 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -283,14 +283,12 @@ $.widget("ui.draggable", $.ui.mouse, { _getHandle: function(event) { var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; - $(this.options.handle, this.element) - .find("*") - .addBack() - .each(function() { - if(this === event.target) { - handle = true; - } - }); + + this.element.find( this.options.handle ).each(function() { + if(this === event.target) { + handle = true; + } + }); return handle; -- cgit v1.2.3