I use Mozilla Firefox to browse the web. When I look at a site and wish to search text on the page, I use the slash / character to initiate incremental search (which is the default Firefox behaviour).

However, when I visit a site like


this site grabs the key press of / to steal it and focus its own search field (which does not search on the current page - and not incrementally (i.e. right away), either). Firefox's incremental search is thereby made inaccessible.

How can I avoid this behaviour? I tried setting

dom.keyboardevent.code.enabled = false

in Firefox's about:config configuration interface but with no apparent effect.

A feature to disable all "key grabbings" by JavaScript in Firefox would be a good solution for me.

  • Sometimes pressing F3 (search again) pops up the search field but only if no previous search took place. So, it is not a good workaround. – Ned64 May 29 '16 at 9:15

One simple solution is to go to about:preferences#advanced and in the Advanced page, tab General, Accessibility, select Search for text when I start typing. This means you don't have to type a / to search.

You should also be able to type Ctrl F to start a search.

You can block the javascript being used to bind / to focus this search box by various means, e.g. see the NoScript and Greasemonkey firefox extensions, or use a proxy like Privoxy with a matching rule.

| improve this answer | |
  • Thanks a lot. I know the option to search right away but no not like it. So there is no way to stop Firefox from offering key events to JavaScript scripts? (I suppose those addons filter the relevant functions out but I find them very intrusive.) Ctrl+F works, though. – Ned64 May 29 '16 at 13:06
  • 1
    Yes, it's sad that browser developers think that a web-site's key bindings should take priority over the user's own bindings. And disabling javascript is less and less of an option as many web sites are now designed so that they hardly work at all without javascript enabled. It's a continuous battle. – meuh May 29 '16 at 13:29
  • I suppose this comes close to an answer since Mozilla apparently won't fix this. – Ned64 Jun 18 '16 at 7:01

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.