We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How to stop sites from changing the behaviour of keys?

more options

In some sites, I can't use arrow keys or pgup pgdown to scroll or f5 to refresh, which is very annoying. Disabling javascript does make the keys work again but breaks the sites. Is there a way to block the javascript thing that mess with the keys or force the browser standard key behaviour?

In some sites, I can't use arrow keys or pgup pgdown to scroll or f5 to refresh, which is very annoying. Disabling javascript does make the keys work again but breaks the sites. Is there a way to block the javascript thing that mess with the keys or force the browser standard key behaviour?

所有回复 (5)

more options

It is okay if my answer is "Maybe"?

In Firefox 58+, if you check the Permissions panel of the Page Info dialog, there is an option to prevent the website from overriding keyboard shortcuts. However, I don't have Firefox 56 handy to see whether it had that option.

While you are on the site, you can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scan/scroll down to "Override Keyboard Shortcuts" and uncheck the "Use default" box, and then select the permission you prefer. In some versions of Firefox, there is a bug where setting Block disables the Backspace button in a form field, so you have to select text and delete it using the Delete key. That may or may not be a crucial issue for the sites where you want to block changes.

If you try this out, does it work?

more options

Also, depending on how the site's scripts work, there may be a way to inject a counter-script to strip away its special key handling. You could investigate a user script as an option for that. These are two sites where people search for and request user scripts, with varying degrees of success:

It might not be practical for complex sites.

more options

Also, since your Firefox identified itself to the forum as an out of date and no longer supported version:

The current releases of Firefox are:

If something is holding you back from upgrading Firefox, please let us know so we can suggest solutions or workarounds. Version 56 is not secure.

more options

jscher2000 said

Also, since your Firefox identified itself to the forum as an out of date and no longer supported version: The current releases of Firefox are: If something is holding you back from upgrading Firefox, please let us know so we can suggest solutions or workarounds. Version 56 is not secure.

Firefox 57 killing most addons (and reducing the surviving ones to bare bones) is the main reason why I stayed on 56. Most people I know think the "new firefox" is worse, as it constantly crashes with out of memory errors or just hang/slow down for them. So I'm not the only crazy one staying in 56.

Thanks for the replies, sorry for asking.

more options

It is sad to lose old extensions, but the depth of loss varies considerably based on which ones you need versus the capabilities of the replacements.

I'm not aware of out of memory errors being any worse in more recent versions of Firefox. If you encounter that problem, please post a new thread.