From e5fb1da164171a62612df8bded8ed3b2af8fed56 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 20 Nov 2011 21:59:31 -0800 Subject: [PATCH] push disable setting to the event loop - this allows for form submit to begin --- js/bootstrap-buttons.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) {