Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

make sure scrollbar-visible class is applied correctly

Jason Kentb20d6455ad0d
diff --git a/web/js/components/util/scrollbar.js b/web/js/components/util/scrollbar.js
index a84d2cf88..aad3035b4 100644
--- a/web/js/components/util/scrollbar.js
+++ b/web/js/components/util/scrollbar.js
@@ -1,4 +1,4 @@
-import React, { useRef, useLayoutEffect } from 'react';
+import React, { useRef, useEffect } from 'react';
import PropTypes from 'prop-types';
import SimpleBarReact from 'simplebar-react';
@@ -36,11 +36,11 @@ export default function Scrollbars(props) {
}
};
- useLayoutEffect(() => {
+ useEffect(() => {
if (!ref || !ref.current) {
return;
}
- setTimeout(() => { toggleVisibleClass(ref.current); }, 100);
+ setTimeout(() => { toggleVisibleClass(ref.current); }, 50);
setScrollTop(ref.current);
});