Commit ba0c6cd5 authored by Mark Otto's avatar Mark Otto

make on prev js changes

parent 451acb42
...@@ -804,7 +804,7 @@ ...@@ -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 @@ ...@@ -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
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment