diff options
| author | Mark Otto <[email protected]> | 2014-11-11 19:25:16 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-11-11 19:25:16 -0800 |
| commit | 1e268ddfc30def5f4b2b0f2ace34b7de549ea830 (patch) | |
| tree | 7cc63bc43a6c3b603cef4f004a2285e5c034a710 /js/button.js | |
| parent | 4f6aeaa6347725436296131c4d2b059243390a04 (diff) | |
| parent | 001d5e00c58bbb8e4d34c085c5b27b214a475bd5 (diff) | |
| download | bootstrap-1e268ddfc30def5f4b2b0f2ace34b7de549ea830.tar.xz bootstrap-1e268ddfc30def5f4b2b0f2ace34b7de549ea830.zip | |
Merge branch 'master' into labels-readme
Diffstat (limited to 'js/button.js')
| -rw-r--r-- | js/button.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/button.js b/js/button.js index 901e47a6e..403829490 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...' @@ -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) @@ -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); |
