mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Fix #12375: stop using document.body.scrollTop as it's deprecated in the strict mode
Closes #12377
This commit is contained in:
parent
0f366e0376
commit
ead17b7ca6
2
dist/js/bootstrap.js
vendored
2
dist/js/bootstrap.js
vendored
@ -1208,7 +1208,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
var $parent = this.$element.parent()
|
var $parent = this.$element.parent()
|
||||||
|
|
||||||
var orgPlacement = placement
|
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 parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
|
||||||
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
|
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
|
||||||
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
|
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
var $parent = this.$element.parent()
|
var $parent = this.$element.parent()
|
||||||
|
|
||||||
var orgPlacement = placement
|
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 parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
|
||||||
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
|
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
|
||||||
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
|
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
|
||||||
|
Loading…
x
Reference in New Issue
Block a user