diff options
| author | Mark Otto <[email protected]> | 2013-07-17 23:33:34 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-07-17 23:33:34 -0700 |
| commit | ba0c6cd57c74be0438a5026d89c67be97f8694d3 (patch) | |
| tree | 51c395f384ea3f38b6c6b4fb89215db8d60439f0 /docs/assets/js/bootstrap.js | |
| parent | 451acb42dbf71d2902dbc9f2e2ab45294401e487 (diff) | |
| download | bootstrap-ba0c6cd57c74be0438a5026d89c67be97f8694d3.tar.xz bootstrap-ba0c6cd57c74be0438a5026d89c67be97f8694d3.zip | |
make on prev js changes
Diffstat (limited to 'docs/assets/js/bootstrap.js')
| -rw-r--r-- | docs/assets/js/bootstrap.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index c562b8836..fa0cec602 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -804,7 +804,7 @@ var Modal = function (element, 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.isShown = null @@ -939,11 +939,12 @@ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') .appendTo(document.body) - this.$backdrop.click( - this.options.backdrop == 'static' ? - $.proxy(this.$element[0].focus, this.$element[0]) - : $.proxy(this.hide, this) - ) + this.$element.on('click', $.proxy(function (e) { + if (e.target !== e.currentTarget) return + this.options.backdrop == 'static' + ? this.$element[0].focus.call(this.$element[0]) + : this.hide.call(this) + }, this)) if (doAnimate) this.$backdrop[0].offsetWidth // force reflow |
