fix Snapshot admin actions buttons submitting on Safari

This commit is contained in:
Nick Sweeting 2021-04-06 00:43:49 -04:00
parent 5a9f27204a
commit 68a506e1a7

View file

@ -148,14 +148,18 @@
$('<button>')
.appendTo(buttons)
.attr('name', this.value)
.attr('type', 'button')
.addClass('button')
.text(this.text)
.click(function () {
.click(function (e) {
e.preventDefault()
e.stopPropagation()
container.find('select')
.find(':selected').attr('selected', '').end()
.find('[value=' + this.name + ']').attr('selected', 'selected');
.find(':selected').removeAttr('selected').end()
.find('[value=' + name + ']').attr('selected', 'selected').click();
$('#changelist-form button[name="index"]').click();
document.querySelector('#logo').outerHTML = '<div class="loader"></div>'
return false
});
});
}