diff options
| author | Mark Otto <[email protected]> | 2012-09-26 16:02:33 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-09-26 16:02:33 -0700 |
| commit | ad96435d27de7661a158552ad088fd800fe66fe9 (patch) | |
| tree | c49fec334cfeb1f4ebf856f5d5c7ba53356309c9 /js | |
| parent | cd5ae9e0304dfba17d445b0c2dac7b17a1faa201 (diff) | |
| parent | 24e277b85abace0f77076b1cfa96e11b1d1dc891 (diff) | |
| download | bootstrap-ad96435d27de7661a158552ad088fd800fe66fe9.tar.xz bootstrap-ad96435d27de7661a158552ad088fd800fe66fe9.zip | |
Merge branch '2.1.2-wip' into box-sizing-exercise
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-affix.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-modal.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-tooltip.js | 8 | ||||
| -rw-r--r-- | js/tests/unit/bootstrap-tooltip.js | 3 |
4 files changed, 9 insertions, 10 deletions
diff --git a/js/bootstrap-affix.js b/js/bootstrap-affix.js index 96bf420d2..c6b9e97b6 100644 --- a/js/bootstrap-affix.js +++ b/js/bootstrap-affix.js @@ -28,7 +28,9 @@ var Affix = function (element, options) { this.options = $.extend({}, $.fn.affix.defaults, options) - this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) this.$element = $(element) this.checkPosition() } diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 041274c5b..d53f13a00 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -49,8 +49,6 @@ if (this.isShown || e.isDefaultPrevented()) return - $('body').addClass('modal-open') - this.isShown = true this.escape() @@ -96,8 +94,6 @@ this.isShown = false - $('body').removeClass('modal-open') - this.escape() $(document).off('focusin.modal') diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 78dddbead..14e48c856 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -121,7 +121,7 @@ $tip .remove() .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) + .insertAfter(this.$element) pos = this.getPosition(inside) @@ -144,7 +144,7 @@ } $tip - .css(tp) + .offset(tp) .addClass(placement) .addClass('in') } @@ -269,7 +269,7 @@ , trigger: 'hover' , title: '' , delay: 0 - , html: true + , html: false } -}(window.jQuery); +}(window.jQuery);
\ No newline at end of file diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js index 14d6b2274..964ba1ef2 100644 --- a/js/tests/unit/bootstrap-tooltip.js +++ b/js/tests/unit/bootstrap-tooltip.js @@ -37,10 +37,11 @@ $(function () { tooltip.tooltip('hide') }) - test("should always allow html entities", function () { + test("should allow html entities", function () { $.support.transition = false var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>') .appendTo('#qunit-fixture') + .tooltip({html: true}) .tooltip('show') ok($('.tooltip b').length, 'b tag was inserted') |
