Prevent default when opening a link in a new window. Fixes Swagger page opening twice.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
Eric Riggs
2018-03-07 17:01:09 -04:00
committed by Roberto Rosario
parent 63f3f83fa3
commit ee75f0e92d

View File

@@ -157,6 +157,7 @@ App.prototype.setupAutoSubmit = function () {
App.prototype.setupNewWindowAnchor = function () {
$('a.new_window').click(function (event) {
event.preventDefault();
var newWindow = window.open($(this).attr('href'), '_blank');
newWindow.focus();
});