MINOR Only setting form state if form element is available in 'ss-ui-button'

This commit is contained in:
Ingo Schommer 2011-05-08 23:35:14 +12:00
parent 0b8f8a3c8a
commit 4feae59391

View File

@ -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();