cogsbox-state 0.5.384 → 0.5.385
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/dist/CogsState.jsx +410 -403
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +7 -2
package/package.json
CHANGED
package/src/CogsState.tsx
CHANGED
|
@@ -2004,14 +2004,19 @@ function createProxyHandler<T>(
|
|
|
2004
2004
|
}
|
|
2005
2005
|
|
|
2006
2006
|
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
2007
|
-
|
|
2007
|
+
console.log(
|
|
2008
|
+
"scrollTop, scrollHeight, clientHeight ",
|
|
2009
|
+
scrollTop,
|
|
2010
|
+
scrollHeight,
|
|
2011
|
+
clientHeight
|
|
2012
|
+
);
|
|
2008
2013
|
// --- START OF MINIMAL FIX ---
|
|
2009
2014
|
// This block is the only thing added. It updates the master 'status'.
|
|
2010
2015
|
// This is the critical missing piece that tells the component if it should auto-scroll.
|
|
2011
2016
|
// A 10px buffer prevents jittering when you are scrolled to the very bottom.
|
|
2012
2017
|
const isAtBottom =
|
|
2013
2018
|
scrollHeight - scrollTop - clientHeight < 10;
|
|
2014
|
-
|
|
2019
|
+
console.log("isAtBottom", isAtBottom);
|
|
2015
2020
|
if (isAtBottom) {
|
|
2016
2021
|
// If we scroll back to the bottom, re-lock.
|
|
2017
2022
|
if (status !== "LOCKED_AT_BOTTOM") {
|