mirror of https://github.com/twbs/bootstrap.git
grunt
This commit is contained in:
parent
275821bbb0
commit
ae50bb7845
|
@ -436,7 +436,7 @@ var Modal = function ($) {
|
||||||
var scrollDiv = document.createElement('div');
|
var scrollDiv = document.createElement('div');
|
||||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
||||||
document.body.appendChild(scrollDiv);
|
document.body.appendChild(scrollDiv);
|
||||||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||||
document.body.removeChild(scrollDiv);
|
document.body.removeChild(scrollDiv);
|
||||||
return scrollbarWidth;
|
return scrollbarWidth;
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -126,9 +126,12 @@ var ScrollSpy = function ($) {
|
||||||
target = $(targetSelector)[0];
|
target = $(targetSelector)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target && (target.offsetWidth || target.offsetHeight)) {
|
if (target) {
|
||||||
// todo (fat): remove sketch reliance on jQuery position/offset
|
var targetBCR = target.getBoundingClientRect();
|
||||||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
if (targetBCR.width || targetBCR.height) {
|
||||||
|
// todo (fat): remove sketch reliance on jQuery position/offset
|
||||||
|
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}).filter(function (item) {
|
}).filter(function (item) {
|
||||||
|
@ -183,7 +186,7 @@ var ScrollSpy = function ($) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
|
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() {
|
ScrollSpy.prototype._process = function _process() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue