From fcd1cafac8afe3a947676ec018e844eeada5b9de Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Wed, 1 May 2013 15:01:32 -0700 Subject: Draggable: active element blurs when clicking on a draggable. Fixes #4261 - Draggable: Inputs do not blur when clicking on a draggable --- tests/unit/testsuite.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/unit/testsuite.js') diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index ddc59ed08..6e840f415 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -175,6 +175,18 @@ TestHelpers.commonWidgetTests = function( widget, settings ) { }); }; +TestHelpers.onFocus= function( element, onFocus ) { + var fn = function( event ){ + if( !event.originalEvent ) { + return; + } + element.unbind( "focus", fn ); + onFocus(); + }; + + element.bind( "focus", fn )[ 0 ].focus(); +}; + /* * Taken from https://github.com/jquery/qunit/tree/master/addons/close-enough */ -- cgit v1.2.3