diff --git a/web/src/views/events/EventView.tsx b/web/src/views/events/EventView.tsx index 673ee624d..6d2d99fe6 100644 --- a/web/src/views/events/EventView.tsx +++ b/web/src/views/events/EventView.tsx @@ -634,10 +634,16 @@ function DetectionReview({ } break; case "PageDown": - contentRef.current?.scrollBy({ top: 600, behavior: "smooth" }); + contentRef.current?.scrollBy({ + top: contentRef.current.clientHeight / 2, + behavior: "smooth", + }); break; case "PageUp": - contentRef.current?.scrollBy({ top: -600, behavior: "smooth" }); + contentRef.current?.scrollBy({ + top: -contentRef.current.clientHeight / 2, + behavior: "smooth", + }); break; } }); diff --git a/web/src/views/search/SearchView.tsx b/web/src/views/search/SearchView.tsx index e586c8846..7e77c20b8 100644 --- a/web/src/views/search/SearchView.tsx +++ b/web/src/views/search/SearchView.tsx @@ -241,10 +241,16 @@ export default function SearchView({ }); break; case "PageDown": - contentRef.current?.scrollBy({ top: 600, behavior: "smooth" }); + contentRef.current?.scrollBy({ + top: contentRef.current.clientHeight / 2, + behavior: "smooth", + }); break; case "PageUp": - contentRef.current?.scrollBy({ top: -600, behavior: "smooth" }); + contentRef.current?.scrollBy({ + top: -contentRef.current.clientHeight / 2, + behavior: "smooth", + }); break; } },