Open sbdchd opened 8 years ago
I made a basic implementation of keyboard navigation, which works for the main page (not the comments).
Suggestions are much appreciated.
Keyboard Nav
j
- move down
k
- move up
o
- open story
c
- open comments page
<backspace>
- go to previous page (this is just normal browser behavior)
@sbdchd wow, that's really cool! I think you need e.preventDefault
for the key presses, I enabled 'Search for text when I start typing' on my Firefox :stuck_out_tongue:
I'll further look at this during the weekend and see what I can do.
There seems to be an issue with this setup triggering more
.
Sometimes, after more
is triggered, the posts will become duplicated on the page.
In this case, the page will add on the items 31-60 multiple times to the current 1-30 posts.
When triggering more
by hand this doesn't happen.
I think it would be convenient to be able to use the keyboard to navigate through posts.