mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-28 22:39:11 +02:00
HTMLElement.offset* by getBoundingClientRect() (#21788)
* Replace element.offet* by getBoundingClientRect() * Use variable to store BoundingClientRect * Fix cc issue...
This commit is contained in:
committed by
Mark Otto
parent
f2f2e39a45
commit
275821bbb0
@@ -211,10 +211,8 @@ const Collapse = (($) => {
|
||||
}
|
||||
|
||||
const dimension = this._getDimension()
|
||||
const offsetDimension = dimension === Dimension.WIDTH ?
|
||||
'offsetWidth' : 'offsetHeight'
|
||||
|
||||
this._element.style[dimension] = `${this._element[offsetDimension]}px`
|
||||
this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`
|
||||
|
||||
Util.reflow(this._element)
|
||||
|
||||
|
Reference in New Issue
Block a user