diff options
author | Shannon <spekary@gmail.com> | 2011-11-23 13:39:45 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-11-23 13:39:45 -0500 |
commit | 2445e20a856192179590c0d08e5d73479df1e52d (patch) | |
tree | 3262e0c31528d61b9ced8c38e71c924f34ea5a6b /tests | |
parent | 54fb1441fe2f9595a8376b9f4bf7d766469f5045 (diff) | |
download | jquery-ui-2445e20a856192179590c0d08e5d73479df1e52d.tar.gz jquery-ui-2445e20a856192179590c0d08e5d73479df1e52d.zip |
Autocomplete: Making sure we do not show search menu after a blur. Fixed #7423 - Tab out of autocomplete with remote source can leave menu showing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_events.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js index 286d902f1..d6a008ea2 100644 --- a/tests/unit/autocomplete/autocomplete_events.js +++ b/tests/unit/autocomplete/autocomplete_events.js @@ -157,6 +157,25 @@ asyncTest( "cancel select", function() { }, 50 ); }); +asyncTest( "blur during remote search", function() { + expect( 1 ); + var ac = $( "#autocomplete" ).autocomplete({ + delay: 0, + source: function( request, response ) { + ok( true, "trigger request" ); + ac.simulate( "blur" ); + setTimeout(function() { + response([ "result" ]); + start(); + }, 100 ); + }, + open: function() { + ok( false, "opened after a blur" ); + } + }); + ac.val( "ro" ).keydown(); +}); + /* TODO previous fix broke more than it fixed, disabling this for now - messed up regular menu select event test("blur without selection", function() { expect(1); |