From 05ddea314cb03832f0914939efc7ad6c1f7d8d9b Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Tue, 8 Jul 2014 22:19:46 +0200 Subject: [PATCH 1/3] Fix IE8 reporting height style as all uppercase --- js/tests/unit/collapse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 976bdcd7bf..8e6bb82736 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -33,14 +33,14 @@ $(function () { var $el = $('
').bootstrapCollapse('show') ok($el.hasClass('in'), 'has class "in"') - ok(!/height/.test($el.attr('style')), 'has height reset') + ok(!/height/i.test($el.attr('style')), 'has height reset') }) test('should hide a collapsed element', function () { var $el = $('
').bootstrapCollapse('hide') ok(!$el.hasClass('in'), 'does not have class "in"') - ok(/height/.test($el.attr('style')), 'has height set') + ok(/height/i.test($el.attr('style')), 'has height set') }) test('should not fire shown when show is prevented', function () { From 0268b41c4f93e8f85c44a9ee2c8177c076c61ede Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Wed, 9 Jul 2014 00:29:38 +0200 Subject: [PATCH 2/3] Fix IE8 reporting type object for `getBoundingClientRect` --- js/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tooltip.js b/js/tooltip.js index b305bc5ab5..0c3a79d0b9 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -321,7 +321,7 @@ var isBody = el.tagName == 'BODY' var isSvg = window.SVGElement && el instanceof window.SVGElement - var elRect = typeof el.getBoundingClientRect == 'function' ? el.getBoundingClientRect() : null + var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var outerDims = isSvg ? {} : { From 1719d2b0516ef17afca36fc95249a10e8f3bd136 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Wed, 9 Jul 2014 00:38:44 +0200 Subject: [PATCH 3/3] `document.head` is undefined in IE8 --- js/tests/unit/tooltip.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 4cecf9348e..6871f538e3 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -470,7 +470,7 @@ $(function () { + '.tooltip.right { white-space: nowrap; }' + '.tooltip.right .tooltip-inner { max-width: none; }' + '' - var $styles = $(styles).appendTo(document.head) + var $styles = $(styles).appendTo('head') var $container = $('
').appendTo(document.body) var $target = $('') @@ -585,7 +585,7 @@ $(function () { + '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }' + 'a[rel="tooltip"] { position: fixed; }' + '' - var $styles = $(styles).appendTo(document.head) + var $styles = $(styles).appendTo('head') var $container = $('
').appendTo(document.body) var $target = $('') @@ -613,7 +613,7 @@ $(function () { + '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }' + 'a[rel="tooltip"] { position: fixed; }' + '' - var $styles = $(styles).appendTo(document.head) + var $styles = $(styles).appendTo('head') var $container = $('
').appendTo(document.body) var $target = $('') @@ -642,7 +642,7 @@ $(function () { + '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }' + 'a[rel="tooltip"] { position: fixed; }' + '' - var $styles = $(styles).appendTo(document.head) + var $styles = $(styles).appendTo('head') var $container = $('