0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-17 14:54:30 +01:00

make on prev js changes

This commit is contained in:
Mark Otto 2013-07-17 23:33:34 -07:00
parent 451acb42db
commit ba0c6cd57c
2 changed files with 8 additions and 7 deletions

View File

@ -804,7 +804,7 @@
var Modal = function (element, options) { var Modal = function (element, options) {
this.options = options this.options = options
this.$element = $(element).delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) this.$element = $(element).on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.$backdrop = this.$backdrop =
this.isShown = null this.isShown = null
@ -939,11 +939,12 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body) .appendTo(document.body)
this.$backdrop.click( this.$element.on('click', $.proxy(function (e) {
this.options.backdrop == 'static' ? if (e.target !== e.currentTarget) return
$.proxy(this.$element[0].focus, this.$element[0]) this.options.backdrop == 'static'
: $.proxy(this.hide, this) ? this.$element[0].focus.call(this.$element[0])
) : this.hide.call(this)
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow if (doAnimate) this.$backdrop[0].offsetWidth // force reflow

File diff suppressed because one or more lines are too long