Skip to content

Commit e310d9f

Browse files
jzaeffererarschmitz
authored andcommitted
Tests: Prevent default on anchor click to avoid navigation
1 parent b58ad12 commit e310d9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/button/events.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ asyncTest( "Anchor recieves click event when spacebar is pressed", function() {
99
expect( 1 );
1010
var element = $( "#anchor-button" ).button();
1111

12-
element.on( "click", function() {
12+
element.on( "click", function( event ) {
13+
event.preventDefault();
1314
ok( true, "click occcured as a result of spacebar" );
1415
start();
1516
} );

0 commit comments

Comments
 (0)