@sheinx/base 3.8.0-beta.42 → 3.8.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/sticky/sticky.js +1 -1
- package/esm/sticky/sticky.js +1 -1
- package/package.json +2 -2
package/cjs/sticky/sticky.js
CHANGED
|
@@ -259,7 +259,7 @@ var Sticky = function Sticky(props) {
|
|
|
259
259
|
if (top !== undefined && Math.ceil(selfRect.top) <= top) {
|
|
260
260
|
setFixedStyle(true, 'top', selfRect.left);
|
|
261
261
|
return;
|
|
262
|
-
} else if (bottom !== undefined && Math.ceil(selfRect.bottom) + bottom > scrollRect.bottom) {
|
|
262
|
+
} else if (bottom !== undefined && (Math.ceil(selfRect.bottom) + bottom > Math.max(window.innerHeight, scrollRect.bottom) || selfRect.bottom + bottom >= window.innerHeight)) {
|
|
263
263
|
setFixedStyle(true, 'bottom', selfRect.left);
|
|
264
264
|
return;
|
|
265
265
|
} else {
|
package/esm/sticky/sticky.js
CHANGED
|
@@ -253,7 +253,7 @@ var Sticky = function Sticky(props) {
|
|
|
253
253
|
if (top !== undefined && Math.ceil(selfRect.top) <= top) {
|
|
254
254
|
setFixedStyle(true, 'top', selfRect.left);
|
|
255
255
|
return;
|
|
256
|
-
} else if (bottom !== undefined && Math.ceil(selfRect.bottom) + bottom > scrollRect.bottom) {
|
|
256
|
+
} else if (bottom !== undefined && (Math.ceil(selfRect.bottom) + bottom > Math.max(window.innerHeight, scrollRect.bottom) || selfRect.bottom + bottom >= window.innerHeight)) {
|
|
257
257
|
setFixedStyle(true, 'bottom', selfRect.left);
|
|
258
258
|
return;
|
|
259
259
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.43",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.8.0-beta.
|
|
13
|
+
"@sheinx/hooks": "3.8.0-beta.43",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|