Skip to content

Commit

Permalink
Fix j/k not skipping over display:none items
Browse files Browse the repository at this point in the history
Hide-filtered posts are display:none-d
  • Loading branch information
cheeaun committed Jan 25, 2025
1 parent b1cad57 commit de0da11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function Timeline({
const activeItemRect = activeItem?.getBoundingClientRect();
const allItems = Array.from(
scrollableRef.current.querySelectorAll(itemsSelector),
);
).filter((item) => !!item.offsetHeight);
if (
activeItem &&
activeItemRect.top < scrollableRef.current.clientHeight &&
Expand Down Expand Up @@ -188,7 +188,7 @@ function Timeline({
const activeItemRect = activeItem?.getBoundingClientRect();
const allItems = Array.from(
scrollableRef.current.querySelectorAll(itemsSelector),
);
).filter((item) => !!item.offsetHeight);
if (
activeItem &&
activeItemRect.top < scrollableRef.current.clientHeight &&
Expand Down

0 comments on commit de0da11

Please sign in to comment.