diff options
author | fat <jacobthornton@gmail.com> | 2013-07-18 10:25:26 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2013-07-18 10:25:26 +0400 |
commit | 8cf04911db36b1ad5f4a98db51b44050c78df18a (patch) | |
tree | 2ed5d6e7d610b21b6d6464ac8391a35038a3407e /docs/assets/js/bootstrap.js | |
parent | 451acb42dbf71d2902dbc9f2e2ab45294401e487 (diff) |
fixes #7776
Diffstat (limited to 'docs/assets/js/bootstrap.js')
-rw-r--r-- | docs/assets/js/bootstrap.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index c562b88362..cf921cf2af 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 @@ -1442,11 +1443,13 @@ } Popover.prototype.getContent = function () { - var content = typeof this.options.content == 'function' ? - this.options.content.call(this.$element[0]) : - this.options.content + var $e = this.$element + var o = this.options - return content || this.$element.attr('data-content') + return $e.attr('data-content') + || (typeof o.content == 'function' ? + o.content.call($e[0]) : + o.content) } Popover.prototype.tip = function () { |