Skip to content

Commit ead17b7

Browse files
Zlatan Vasovićcvrebert
authored andcommitted
Fix twbs#12375: stop using document.body.scrollTop as it's deprecated in the strict mode
Closes twbs#12377
1 parent 0f366e0 commit ead17b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/js/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
12081208
var $parent = this.$element.parent()
12091209

12101210
var orgPlacement = placement
1211-
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
1211+
var docScroll = document.documentElement.scrollTop
12121212
var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
12131213
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
12141214
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left

js/tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
var $parent = this.$element.parent()
161161

162162
var orgPlacement = placement
163-
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
163+
var docScroll = document.documentElement.scrollTop
164164
var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
165165
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
166166
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left

0 commit comments

Comments
 (0)