Live data from Hacker News

Ask HN: Please stop overriding standard browser navigation keys with Javascript.

news.ycombinator.com

31–40 of 59 posts

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#31
post #11
post #9

1. I hate, hate, hate that the backspace key is a shortcut for "back". I have never, not once hit the backspace key wanting to go back to the previous page. 2. I'll generally give the bigger players like Google some lee-way in trying out new functionality like this. It's the smaller sites that should generally stick to familiarity (except for the handful who are making a point of exploring behaviors).

1. I do it all the time. Shift-backspace happens to mean forward too. ;)

Most of the times I hit backspace is when I am filling out a form and the idiotic browser behavior of going back a page blows away all of my input. It is beyond infuriating.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#34
This is a browser bug. If you don't want the browser to send keystrokes to the selected page, program it not to.

(I tried to do this in conkeror to override Github's retarded keybinding for "l", but I failed. I don't blame Github, though, I blame my shitty user agent.)

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#35

I don't see keyboard navigation as being standard, and what seems to be standard isn't very good. Perhaps browsers should have an option to limit JavaScript's ability to override keystrokes used in navigation. I use Pentadactyl, a vi-like keyboard navigation plugin for Firefox, which doesn't seem to be plagued by this problem. I learned about it here on HN.

I would settle for a way to see mappings. Browsers already have to know what the mappings are in order to support them, they just don't share that information with users. In a menu, all I have to do is read to find out what the keys are for each command. Much like each browser has a Back button, it'd be nice if all browsers could agree to provide a "legend" displaying the keystrokes that a web site has defined. Of co…

>I would settle for a way to see mappings. Browsers already have to know what the mappings are in order to support them, they just don't share that information with users.

It's not that simple- the onkeypress event fires every time a key is pressed. What the function handler actually does is non-deterministic. The web app would have to somehow declare its keyboard shortcuts.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#36
I use my backspace-key zu back-navigate very often. Very Often. Until I stumble upon a Google Searchtesult page.... ugh. Why I like my Backspace-Key to go back? Because beside its name, its right above my returnkey and switching to a URL to read something up and then quickly get back is a nice feature. Yeah ALT+CURSOR_LEFT works too, but that are two Fingers I have to positionate to hit the correct key while backspace is just 1cm moving of my index finger.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#37
post #31
post #11

Earlier quoted context omitted.

1. I do it all the time. Shift-backspace happens to mean forward too. ;)

Most of the times I hit backspace is when I am filling out a form and the idiotic browser behavior of going back a page blows away all of my input. It is beyond infuriating.

If you're using safari, then press forward right away because your form data will still be there.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#38

I don't see keyboard navigation as being standard, and what seems to be standard isn't very good. Perhaps browsers should have an option to limit JavaScript's ability to override keystrokes used in navigation. I use Pentadactyl, a vi-like keyboard navigation plugin for Firefox, which doesn't seem to be plagued by this problem. I learned about it here on HN.

I would settle for a way to see mappings. Browsers already have to know what the mappings are in order to support them, they just don't share that information with users. In a menu, all I have to do is read to find out what the keys are for each command. Much like each browser has a Back button, it'd be nice if all browsers could agree to provide a "legend" displaying the keystrokes that a web site has defined. Of co…

> Browsers already have to know what the mappings are in order to support them, they just don't share that information with users.

Unfortunately the way this works in the DOM makes that undecidable. An arbitrary piece of JS code from the web page gets invoked for every keystroke, if the page code has added a handler for key events. If it has not called cancelDefault() on the event object by the time it returns, the browser takes the default action. The question of whether or not user JS code will invoke cancelDefault() for a given event is equivalent to the halting problem.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#39
post #32

Wow, that's my biggest pet peeve on Google. I think this started after Instant and drives me NUTS all the time.

But does it lose data like accidentally hitting backspace does?

No data is lost... if you're doing it wrong and hit backspace, hit 'page forward' to correct your blatant error.

Re: Ask HN: Please stop overriding standard browser navigation keys with Javascript.

#40
This riles me up so much. Google is the biggest offender in remapping standard arrow keys. I hate Google Instant with passion because it remaps the arrow keys to its stupid chunking navigation. If it's not for the setting to turn it off, I would have gone off to bing or ddg. Still the setting to turn it off is reset every couple weeks, extremely annoying.
Post reply on HN