0

It's becoming more and more popular for websites to grab the arrow keys via JavaScript and use them for site navigation in ways that breaks scrolling with the arrow keys. Short of NoScript, is there any way suppress this behavior, preferably on a configurable-per-site basis? Since I often use both Chrome and Firefox, I'd like to find solutions for both, either in terms of a setting or an extension that fixes the broken sites (including Google search results and GMail). Any ideas?

  • To be clear, you want to allow javascript on certain sites but still prevent javascript from changing only select key bindings? I'm thinking you will need to write an overlay script using something like GreaseMonkey. – RockPaperLizard Nov 5 '14 at 2:25
  • I'm not familiar with the exact mechanism by which JS steals key events, but the goal would be to prevent overriding of at least the arrow keys, with the ability to use a blacklist or whitelist approach for allowing some sites to steal them. My impression is that the ability to bind keys when a particular object (like an edit area) is focused is important, so if it's possible to allow that while forbidding it at the whole-page scope, that would greatly lessen the need for whitelisting. – R.. Nov 5 '14 at 3:22
  • I think it could definitely be done with a javascript overlay. – RockPaperLizard Nov 5 '14 at 3:46
1

I use the "RightToClick" add-in. When a page starts grabbing clicks or other keys like up or down arrow I click the icon in the extension toolbar and put an end to that.

It has a black list also, such that it always turns on for specific hosts.

https://addons.mozilla.org/en-us/firefox/addon/righttoclick/

This is indeed becoming a problem. Google search now grabs down arrow presses for it's own use and prevents you from scrolling. Yahoo mail is so javascriptified now, that sometimes you cannot even bring up basic browser menus.

  • Looks promising. I'm trying it. – R.. Dec 3 '14 at 20:38
  • It seems to work, but only when activated explicitly. Is there any way to have it always active on certain sites? – R.. Dec 3 '14 at 20:57
  • Yes. Options->Advanced Options->Always run on these hosts – Christian Shay Dec 3 '14 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.