From c207b5b66b2f41472b706b9e37557c6105eb1a80 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Tue, 26 Aug 2014 03:02:29 +0200 Subject: Change value of stateful button after event loop Fixes #14450 --- js/button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index b3e944c59..1b9a2f23b 100644 --- a/js/button.js +++ b/js/button.js @@ -35,10 +35,10 @@ if (data.resetText == null) $el.data('resetText', $el[val]()) - $el[val](data[state] == null ? this.options[state] : data[state]) - // push to event loop to allow forms to submit setTimeout($.proxy(function () { + $el[val](data[state] == null ? this.options[state] : data[state]) + if (state == 'loadingText') { this.isLoading = true $el.addClass(d).attr(d, d) -- cgit v1.2.3 From 94b59b57d6cae8ba6503b3040d361a4efda5cdc6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 29 Oct 2014 08:56:20 -0700 Subject: version bump --- js/button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index 7a449980a..2be02341d 100644 --- a/js/button.js +++ b/js/button.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: button.js v3.2.0 + * Bootstrap: button.js v3.3.0 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -19,7 +19,7 @@ this.isLoading = false } - Button.VERSION = '3.2.0' + Button.VERSION = '3.3.0' Button.DEFAULTS = { loadingText: 'loading...' -- cgit v1.2.3 From 5178d8b8bab50d5b9e03e00db5340178f8507035 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Thu, 30 Oct 2014 03:46:49 +0100 Subject: Use RegExp for button plugin's focus shim Fixes #14923. --- js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index 2be02341d..403829490 100644 --- a/js/button.js +++ b/js/button.js @@ -110,7 +110,7 @@ e.preventDefault() }) .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus') + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) }) }(jQuery); -- cgit v1.2.3