From ead17b7ca6342ceb39b614d7179b9031902ea63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 25 Jan 2014 12:16:45 +0100 Subject: [PATCH] Fix #12375: stop using document.body.scrollTop as it's deprecated in the strict mode Closes #12377 --- dist/js/bootstrap.js | 2 +- js/tooltip.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 5a130ff02e..1bf7ffafa9 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -1208,7 +1208,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var $parent = this.$element.parent() var orgPlacement = placement - var docScroll = document.documentElement.scrollTop || document.body.scrollTop + var docScroll = document.documentElement.scrollTop var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left diff --git a/js/tooltip.js b/js/tooltip.js index 7b75d79393..eb7875c9fe 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -160,7 +160,7 @@ var $parent = this.$element.parent() var orgPlacement = placement - var docScroll = document.documentElement.scrollTop || document.body.scrollTop + var docScroll = document.documentElement.scrollTop var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left