mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
grunt
This commit is contained in:
parent
275821bbb0
commit
ae50bb7845
4 changed files with 10 additions and 7 deletions
2
js/dist/modal.js
vendored
2
js/dist/modal.js
vendored
|
@ -436,7 +436,7 @@ var Modal = function ($) {
|
|||
var scrollDiv = document.createElement('div');
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
||||
document.body.appendChild(scrollDiv);
|
||||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
||||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
};
|
||||
|
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
7
js/dist/scrollspy.js
vendored
7
js/dist/scrollspy.js
vendored
|
@ -126,10 +126,13 @@ var ScrollSpy = function ($) {
|
|||
target = $(targetSelector)[0];
|
||||
}
|
||||
|
||||
if (target && (target.offsetWidth || target.offsetHeight)) {
|
||||
if (target) {
|
||||
var targetBCR = target.getBoundingClientRect();
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// todo (fat): remove sketch reliance on jQuery position/offset
|
||||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
|
@ -183,7 +186,7 @@ var ScrollSpy = function ($) {
|
|||
};
|
||||
|
||||
ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.offsetHeight;
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
|
||||
};
|
||||
|
||||
ScrollSpy.prototype._process = function _process() {
|
||||
|
|
2
js/dist/scrollspy.js.map
vendored
2
js/dist/scrollspy.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue