diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index db93bc258e..42e6edc480 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -584,8 +584,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .addClass('collapsing') - .removeClass('collapse') - .removeClass('in') + .removeClass('collapse in') this.transitioning = 1 @@ -657,7 +656,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (!data || !data.transitioning) { if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $this.toggleClass('collapsed', $target.hasClass('in')) } Plugin.call($target, option) @@ -954,11 +953,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re Modal.prototype.escape = function () { if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { + this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { e.which == 27 && this.hide() }, this)) } else if (!this.isShown) { - this.$element.off('keyup.dismiss.bs.modal') + this.$element.off('keydown.dismiss.bs.modal') } } @@ -985,7 +984,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$backdrop = $('