diff options
author | Steven Luscher <jquerycla@steveluscher.com> | 2013-05-01 15:01:32 -0700 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-06-19 18:07:38 -0400 |
commit | fcd1cafac8afe3a947676ec018e844eeada5b9de (patch) | |
tree | 4dee58eb628ea32edb7f0ac6f22def8aba2d3d55 /tests/unit/testsuite.js | |
parent | bca3e058e89bf40806170149b8029dfe52644248 (diff) | |
download | jquery-ui-fcd1cafac8afe3a947676ec018e844eeada5b9de.tar.gz jquery-ui-fcd1cafac8afe3a947676ec018e844eeada5b9de.zip |
Draggable: active element blurs when clicking on a draggable. Fixes #4261 - Draggable: Inputs do not blur when clicking on a draggable
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r-- | tests/unit/testsuite.js | 12 |
1 files changed, 12 insertions, 0 deletions
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 */ |