mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-16 10:47:32 -05:00
jump scroll
This commit is contained in:
@@ -213,7 +213,7 @@ useLayoutEffect(() => {
|
|||||||
if (pageYOffset.current) {
|
if (pageYOffset.current) {
|
||||||
const scrollAmount = parseInt(positionRef.current.clientHeight) - parseInt(pageYOffset.current.position);
|
const scrollAmount = parseInt(positionRef.current.clientHeight) - parseInt(pageYOffset.current.position);
|
||||||
if (pageYOffset.current.direction == "top") {
|
if (pageYOffset.current.direction == "top") {
|
||||||
window.scrollBy(0, scrollAmount);
|
window.scrollBy({left: 0, top: scrollAmount, behavior: "auto"});
|
||||||
} else {
|
} else {
|
||||||
//window.scrollBy(0, -1 * scrollAmount);
|
//window.scrollBy(0, -1 * scrollAmount);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user