logoalt Hacker News

aarvin_roshinyesterday at 10:36 PM1 replyview on HN

Unrelated to the idea, but this website strangely blocks `Alt+←` and `Alt+→` to cycle through browser history.

Edit: It seems the website overrides the `←` and `→` arrow keys specifically, and using `event.preventDefault()` causes the problem. I think it's good practice to ignore keys with modifiers in such a situation.


Replies

embedding-shapeyesterday at 10:40 PM

It's not "blocked", the person implementing it just forgo any sort of browser history usage when creating the website/"app", and the entire thing is controlled 100% in their own JS code. I guess author only had their specific mobile use in mind when creating it? Maybe swiping for back/forward works if you view it on the phone?

show 1 reply