1
0
Fork 0
mirror of synced 2024-06-29 03:20:58 +12:00

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