Skip to content

Commit

Permalink
Prevent page jump to top when clicking on tab
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dylanlive authored and shs96c committed Mar 27, 2018
1 parent a3a2062 commit 89c1b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/server/src/org/openqa/grid/images/consoleservlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
}

$(document).ready(function() {
$(".tabs li").click(function() {
$(".tabs li").click(function(event) {
var currentProxy = $(this).closest('.proxy');
var type = $(this).attr('type');
show(currentProxy, type);
event.preventDefault(); // Prevent the click from going to the top of the page
});
showDefaults();
});
Expand Down

0 comments on commit 89c1b69

Please sign in to comment.