diff options
| author | Mark Otto <[email protected]> | 2013-06-02 11:57:28 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-06-02 11:57:28 -0700 |
| commit | 75db70a6c21fec96ba3fd65b16a53fde659ea97d (patch) | |
| tree | 0d3bb61dd62f78e1cc329d56dad21eba7c4b43fd /js | |
| parent | 8899c30f16a32f1c3237242abf5e1bde5d88d0ca (diff) | |
| parent | a4c1248ca006617b371a739217cded5ae05ca33a (diff) | |
| download | bootstrap-75db70a6c21fec96ba3fd65b16a53fde659ea97d.tar.xz bootstrap-75db70a6c21fec96ba3fd65b16a53fde659ea97d.zip | |
Merge branch '3.0.0-wip' of github.com:twitter/bootstrap into 3.0.0-wip
Diffstat (limited to 'js')
| -rw-r--r-- | js/modal.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/modal.js b/js/modal.js index 07b508124..81766b323 100644 --- a/js/modal.js +++ b/js/modal.js @@ -106,18 +106,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') } |
