diff options
| author | Chris Rebert <[email protected]> | 2014-04-20 16:19:13 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-04-20 16:19:13 -0700 |
| commit | eaddbd92bb19f0ee7e04ae12736de4d49e33c925 (patch) | |
| tree | afcf5a490dbaaec694a4e29724fa8acb61334768 /dist/js/bootstrap.js | |
| parent | e0c3ae61333c76b5f1490f074c6558498d5e995d (diff) | |
| download | bootstrap-eaddbd92bb19f0ee7e04ae12736de4d49e33c925.tar.xz bootstrap-eaddbd92bb19f0ee7e04ae12736de4d49e33c925.zip | |
grunt dist
Diffstat (limited to 'dist/js/bootstrap.js')
| -rw-r--r-- | dist/js/bootstrap.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 40aaf9f35..0129301c3 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -243,7 +243,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // BUTTON DATA-API // =============== - $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') $btn.button('toggle') @@ -523,7 +523,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } this.$element .removeClass('collapsing') - .addClass('collapse in')[dimension]('auto') + .addClass('collapse in')[dimension]('') this.transitioning = 0 this.$element.trigger('shown.bs.collapse') } @@ -719,6 +719,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } function clearMenus(e) { + if (e && e.which === 3) return $(backdrop).remove() $(toggle).each(function () { var $parent = getParent($(this)) @@ -929,7 +930,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var that = this this.$element.hide() this.backdrop(function () { - that.removeBackdrop() that.$element.trigger('hidden.bs.modal') }) } @@ -940,6 +940,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } Modal.prototype.backdrop = function (callback) { + var that = this var animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { @@ -970,11 +971,15 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass('in') + var callbackRemove = function() { + that.removeBackdrop() + callback && callback() + } $.support.transition && this.$element.hasClass('fade') ? this.$backdrop - .one($.support.transition.end, callback) + .one($.support.transition.end, callbackRemove) .emulateTransitionEnd(150) : - callback() + callbackRemove() } else if (callback) { callback() |
