aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2015-10-06 14:30:41 +0200
committerAlexander Schmitz <arschmitz@gmail.com>2015-10-08 14:02:59 -0400
commite310d9f16094e5236dbfcfbfa6fc684091dd7668 (patch)
tree745f269deb4a44c5cf506ef2a14d6deca456959d
parentb58ad12a680c37397909867e1fac31e692690259 (diff)
downloadjquery-ui-e310d9f16094e5236dbfcfbfa6fc684091dd7668.tar.gz
jquery-ui-e310d9f16094e5236dbfcfbfa6fc684091dd7668.zip
Tests: Prevent default on anchor click to avoid navigation
-rw-r--r--tests/unit/button/events.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/button/events.js b/tests/unit/button/events.js
index 0bec5a7d2..f780fb494 100644
--- a/tests/unit/button/events.js
+++ b/tests/unit/button/events.js
@@ -9,7 +9,8 @@ asyncTest( "Anchor recieves click event when spacebar is pressed", function() {
expect( 1 );
var element = $( "#anchor-button" ).button();
- element.on( "click", function() {
+ element.on( "click", function( event ) {
+ event.preventDefault();
ok( true, "click occcured as a result of spacebar" );
start();
} );