0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-31 23:52:18 +01:00

Merge branch '3.0.0-wip' of github.com:twitter/bootstrap into 3.0.0-wip

This commit is contained in:
Mark Otto 2013-06-02 11:57:28 -07:00
commit 75db70a6c2
4 changed files with 15 additions and 17 deletions

View File

@ -872,18 +872,18 @@
Modal.prototype.enforceFocus = function () { Modal.prototype.enforceFocus = function () {
$(document) $(document)
.off('focusin.bs.modal') // guard against infinite focus loop .off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', function (e) { .on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.focus() this.$element.focus()
} }
}, this) }, this))
} }
Modal.prototype.escape = function () { Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) { 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() e.which == 27 && this.hide()
}, this) }, this))
} else if (!this.isShown) { } else if (!this.isShown) {
this.$element.off('keyup.dismiss.bs.modal') this.$element.off('keyup.dismiss.bs.modal')
} }

File diff suppressed because one or more lines are too long

View File

@ -106,18 +106,18 @@
Modal.prototype.enforceFocus = function () { Modal.prototype.enforceFocus = function () {
$(document) $(document)
.off('focusin.bs.modal') // guard against infinite focus loop .off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', function (e) { .on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.focus() this.$element.focus()
} }
}, this) }, this))
} }
Modal.prototype.escape = function () { Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) { 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() e.which == 27 && this.hide()
}, this) }, this))
} else if (!this.isShown) { } else if (!this.isShown) {
this.$element.off('keyup.dismiss.bs.modal') this.$element.off('keyup.dismiss.bs.modal')
} }

View File

@ -131,8 +131,6 @@
@input-height-large: (@line-height-computed + (@padding-large-vertical * 2)); @input-height-large: (@line-height-computed + (@padding-large-vertical * 2));
@input-height-small: (@line-height-computed + (@padding-small-vertical * 2)); @input-height-small: (@line-height-computed + (@padding-small-vertical * 2));
@form-actions-bg: #f5f5f5;
// Dropdowns // Dropdowns
// ------------------------- // -------------------------