Skip to content

Commit 2fd2628

Browse files
committed
update: 修正scrollIntoView在无滚动条的情况下导致scrollParent报错问题
1 parent 338f5ae commit 2fd2628

17 files changed

+286
-249
lines changed

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
overflow: auto;
1616
}
1717
</style>
18-
<link href="static\css\vendors.8e7adae1.css" rel="stylesheet"><link href="static\css\index.17c1c53a.css" rel="stylesheet"></head>
18+
<link href="static\css\index.c57af803.css" rel="stylesheet"></head>
1919

2020
<body style="background:#F5F5F5">
2121
<div class="demo" id="demo">
2222
</div>
23-
<script src="static\js\vendors.97067170.chunk.js"></script><script src="static\js\index.e4b5ae6c.js"></script></body>
23+
<script src="static\js\vendors.308b581e.chunk.js"></script><script src="static\js\index.ed336b3c.js"></script></body>
2424

2525
</html>
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/css/vendors.8e7adae1.css

Lines changed: 0 additions & 92 deletions
This file was deleted.

docs/static/css/vendors.8e7adae1.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/static/js/index.e4b5ae6c.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 32 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/js/index.ed336b3c.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ module.exports = function scrollPrarent(node) {
10251025
excludeStatic = position === 'absolute',
10261026
ownerDoc = node.ownerDocument,
10271027
overflowRegex = /(auto|scroll)/;
1028-
if (position === 'fixed') return ownerDoc || document;
1028+
if (position === 'fixed') return (ownerDoc || document).documentElement;
10291029

10301030
while ((node = node.parentNode) && node.nodeType !== 9) {
10311031
var isStatic = excludeStatic && (0, _css.default)(node, 'position') === 'static',
@@ -1035,7 +1035,7 @@ module.exports = function scrollPrarent(node) {
10351035
if (overflowRegex.test(style) && hasScroll) return node;
10361036
}
10371037

1038-
return document;
1038+
return document.documentElement;
10391039
};
10401040

10411041
/***/ }),
@@ -26114,17 +26114,6 @@ if (false) {} else {
2611426114
}
2611526115

2611626116

26117-
/***/ }),
26118-
26119-
/***/ "./node_modules/react-widget-scrollview/lib/style/index.css":
26120-
/*!******************************************************************!*\
26121-
!*** ./node_modules/react-widget-scrollview/lib/style/index.css ***!
26122-
\******************************************************************/
26123-
/*! no static exports found */
26124-
/***/ (function(module, exports, __webpack_require__) {
26125-
26126-
// extracted by mini-css-extract-plugin
26127-
2612826117
/***/ }),
2612926118

2613026119
/***/ "./node_modules/react/cjs/react.development.js":
@@ -29736,4 +29725,4 @@ if (!self.fetch) {
2973629725
/***/ })
2973729726

2973829727
}]);
29739-
//# sourceMappingURL=vendors.97067170.chunk.js.map
29728+
//# sourceMappingURL=vendors.308b581e.chunk.js.map

docs/static/js/vendors.308b581e.chunk.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)