diff options
author | fat <jacobthornton@gmail.com> | 2013-05-29 19:24:00 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2013-05-29 19:24:00 +0400 |
commit | f5ce66177bba1e5613a481d7d2a0e9bcfab077f0 (patch) | |
tree | 6b2d91b590c6c3b7f2046f57df1af3fe7758bd2b /docs/assets/js/bootstrap.js | |
parent | a7a87c8e8c3343f6d9dea868d578178de8907f98 (diff) |
fix event binding in modal.js
Diffstat (limited to 'docs/assets/js/bootstrap.js')
-rw-r--r-- | docs/assets/js/bootstrap.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 4ec229c8ac..f86cd05f7b 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -872,18 +872,18 @@ Modal.prototype.enforceFocus = function () { $(document) .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.focus() - } - }, this) + .on('focusin.bs.modal', $.proxy(function (e) { + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + this.$element.focus() + } + }, this)) } Modal.prototype.escape = function () { if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.bs.modal', function ( e ) { + this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { e.which == 27 && this.hide() - }, this) + }, this)) } else if (!this.isShown) { this.$element.off('keyup.dismiss.bs.modal') } |