diff options
| author | Heinrich Fenkart <[email protected]> | 2014-09-11 23:43:27 +0200 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-09-11 23:43:27 +0200 |
| commit | cabace78da29dd2b2928ca5f42e6a2a80307ee34 (patch) | |
| tree | ad2966c4a6d9d4a256d5e391bd12603a7d3362bd /dist/js/bootstrap.js | |
| parent | 6e206f5e8f3efbd80ade3d6e9109a7f7db312d8c (diff) | |
| download | bootstrap-cabace78da29dd2b2928ca5f42e6a2a80307ee34.tar.xz bootstrap-cabace78da29dd2b2928ca5f42e6a2a80307ee34.zip | |
G R U N T
Diffstat (limited to 'dist/js/bootstrap.js')
| -rw-r--r-- | dist/js/bootstrap.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 64dffbaa9..4372bbe6b 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -1282,7 +1282,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (this.hasContent() && this.enabled) { this.$element.trigger(e) - var inDom = $.contains(document.documentElement, this.$element[0]) + var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) if (e.isDefaultPrevented() || !inDom) return var that = this @@ -1459,6 +1459,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var isSvg = window.SVGElement && el instanceof window.SVGElement var elRect = el.getBoundingClientRect() + if (elRect.width == null) { + // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 + elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) + } var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var outerDims = isSvg ? {} : { @@ -2170,8 +2174,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re data.offset = data.offset || {} - if (data.offsetBottom) data.offset.bottom = data.offsetBottom - if (data.offsetTop) data.offset.top = data.offsetTop + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom + if (data.offsetTop != null) data.offset.top = data.offsetTop Plugin.call($spy, data) }) |
