mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Only setting form state if form element is available in 'ss-ui-button'
This commit is contained in:
parent
0b8f8a3c8a
commit
4feae59391
@ -26,10 +26,12 @@
|
||||
.click(function() {
|
||||
var form = this.form;
|
||||
// forms don't natively store the button they've been triggered with
|
||||
if(form) {
|
||||
form.clickedButton = this;
|
||||
// Reset the clicked button shortly after the onsubmit handlers
|
||||
// have fired on the form
|
||||
setTimeout(function() {form.clickedButton = null;}, 10);
|
||||
}
|
||||
});
|
||||
|
||||
this._super();
|
||||
|
Loading…
x
Reference in New Issue
Block a user