From: Jacob Thornton Date: Mon, 21 Nov 2011 05:59:31 +0000 (-0800) Subject: push disable setting to the event loop - this allows for form submit to begin X-Git-Tag: v2.0.0~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5fb1da164171a62612df8bded8ed3b2af8fed56;p=thirdparty%2Fbootstrap.git push disable setting to the event loop - this allows for form submit to begin --- diff --git a/js/bootstrap-buttons.js b/js/bootstrap-buttons.js index 16fa161cb9..ba52f1c06b 100644 --- a/js/bootstrap-buttons.js +++ b/js/bootstrap-buttons.js @@ -31,9 +31,11 @@ $el.html( data[state] || $.fn.button.defaults[state] ) - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) } function toggle(el) {