diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-09-05 16:07:36 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-09-05 16:07:36 -0400 |
commit | e162fddd9547d07c6ad1badc135a456f4012ad34 (patch) | |
tree | 5045d0667ee8f7225338170f8ce78bf65fc6c4e5 /tests | |
parent | 6abb10766c985bd2f3b0d580058c3e6ade18edaf (diff) | |
download | jquery-ui-e162fddd9547d07c6ad1badc135a456f4012ad34.tar.gz jquery-ui-e162fddd9547d07c6ad1badc135a456f4012ad34.zip |
Menu: Don't move focus from the active item on click. Fixes #8552 - selected value overwritten/not correctly set.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/menu/menu_events.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index 69ae2e14f..d69fc46a3 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -57,13 +57,15 @@ asyncTest( "handle blur", function() { }); click( element, "1" ); - setTimeout( function() { + setTimeout(function() { element.blur(); - start(); - }, 350 ); + setTimeout(function() { + start(); + }, 350 ); + }); }); -asyncTest( "handle blur on click", function() { +asyncTest( "handle blur via click outside", function() { expect( 1 ); var blurHandled = false, element = $( "#menu1" ).menu({ @@ -77,10 +79,12 @@ asyncTest( "handle blur on click", function() { }); click( element, "1" ); - setTimeout( function() { + setTimeout(function() { $( "<a>", { id: "remove"} ).appendTo( "body" ).trigger( "click" ); - start(); - }, 350 ); + setTimeout(function() { + start(); + }, 350 ); + }); }); test( "handle focus of menu with active item", function() { |