Skip to content

Commit 89c1b69

Browse files
dylanliveshs96c
authored andcommitted
Prevent page jump to top when clicking on tab
Prevent the click event from acting like a link, so that it doesn't jump to the top of the page when a user clicks on the Browsers or Configuration tab of a node within the console.
1 parent a3a2062 commit 89c1b69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/server/src/org/openqa/grid/images/consoleservlet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
}
2929

3030
$(document).ready(function() {
31-
$(".tabs li").click(function() {
31+
$(".tabs li").click(function(event) {
3232
var currentProxy = $(this).closest('.proxy');
3333
var type = $(this).attr('type');
3434
show(currentProxy, type);
35+
event.preventDefault(); // Prevent the click from going to the top of the page
3536
});
3637
showDefaults();
3738
});

0 commit comments

Comments
 (0)