---
title: "Discussion on \"How to navigate a list with arrow keys in vanilla js ?\" | Hashnode"
description: "Discussion on \"How to navigate a list with arrow keys in vanilla js ?\". Learn to navigate a list using arrow keys."
url: "https://hashnode.com/posts/how-to-navigate-a-list-with-arrow-keys-in-vanilla-js/630874674d50fd71142c601b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to navigate a list with arrow keys in vanilla js ?](https://deepak-pundir.hashnode.dev/how-to-navigate-a-list-with-arrow-keys-in-vanilla-js?utm_source=hashnode&utm_medium=feed)

Learn to navigate a list using arrow keys.

Aug 26, 2022 · 4 min read · deepak-pundir.hashnode.dev  
Read the article

-   [#vanilla-js-1](https://hashnode.com/tag/vanilla-js-1)
-   [#events](https://hashnode.com/tag/events)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Deepak Pundir](https://hashnode.com/@Deepak8717)

@Deepak8717

  
[View profile](https://hashnode.com/@Deepak8717)

Born to learn. Curious about everything.

## Responses 2

Markdown supported · ⌘↵ to post

[Ooker](https://hashnode.com/@ooker)

[Mar 25, 2024](https://hashnode.com/posts/how-to-navigate-a-list-with-arrow-keys-in-vanilla-js/630874674d50fd71142c601b/comment/660138f4d1f9bfe368596d6a)

This is wonderful. I create an account just to send heart to this article.

[Joshua Lippiner](https://hashnode.com/@jlippiner)

[Dec 6, 2023](https://hashnode.com/posts/how-to-navigate-a-list-with-arrow-keys-in-vanilla-js/630874674d50fd71142c601b/comment/6570960e37f7fa8c152a27c1)

This is wonderful, EXCEPT there is a problem if the list is in a div in a modal or floating on the screen. When you use the arrow keys, the list does scroll but so does the entire PAGE. Also, if you have a fixed height and css overflow: hidden, when it gets to the end of the list it doesnt scroll in the list.

Any thoughts on how to address this?
