8

Some websites override the behavior of the '/' key in Firefox. Normally this opens the incremental search toolbar at the bottom of the page. But on some websites it places the cursor in a search box on the site itself. How can I prevent this?

compie
  • 473
  • 4
  • 8
  • 13
  • I guess an example website might help. – Arjan Feb 26 '10 at 13:35
  • Arjan: https://mail.google.com/ – u1686_grawity Feb 26 '10 at 14:33
  • Pressing the slash on https://mail.google.com/ works fine on my Mac. (I do have the *keyconfig* add-on installed, and the *Nightly Tester Tools* to enable that add-on; maybe that's keeping websites from stealing the keyboard shortcut then. But I did not explicitly map the slash, so I doubt that.) The question is not about websites that initially focus some input, right? – Arjan Feb 26 '10 at 14:43
  • Do you have another website? The keyboard shortcuts on mail.google.com can be disabled in `Mail Settings` -> `General` -> `Keyboard Shortcuts` which I have done (and possible @arjan has as well which is why he can't duplicate the issue either). – Jonathan Heady Jul 02 '11 at 09:32
  • You can also use CTRL + F to open the seach box. ;-) – DiableNoir Jul 02 '11 at 16:07
  • I always turn on "Search for text when I start typing" so I don't need `Ctrl+F` or `/` – phuclv Apr 27 '17 at 10:48
  • I've answered over here: https://superuser.com/a/1688490/21402 – Tobu Nov 21 '21 at 19:05

2 Answers2

2

This Q is definitely addressed by the comments, so I'll rehash in a useful way:

You can disable gmail's shortcuts with Mail Settings -> General -> Keyboard Shortcuts if that's interferring.

You can always use ctrl+F or just the ' (apostrophe character) too.

If you have further examples, put some out there, but I haven't found this behavior.

Useful links:
Firefox's help on searching
Syntax to tweak your about:config data in Firefox here

mbb
  • 2,496
  • 7
  • 27
  • 39
  • 2
    Another example: about every Confluence site in the world ;) – Gressie Oct 19 '11 at 08:53
  • 5
    Other examples: Twitter, Facebook (Messages), Rally. It's so absurd to me, because the only way anyone will discover this "feature" is by trying to use / for its usual purpose! The only people who are affected by this are the ones who are frustrated by it! – MikeFHay May 13 '13 at 10:23
  • This only addresses GMail. Doesn't answer the original, more general question – Ben Jaguar Marshall Sep 27 '21 at 07:35
1

I got annoyed by a website taking over my slash yet again (youtube this time), went researching and landed here, saw there was no good answer, so decided to try and figure it out.

Turns out it's not actually that hard. Just install Greasemonkey (or equivalent js userscript addon), make a New user script, paste:

// ==UserScript==
// @name           disable websites intercepting slash
// @description    "/" slash should always bring up FF quickfind
// @run-at         document-start
// @include        *
// @grant          none
// ==/UserScript==
document.addEventListener('keydown', function(e) {
  e.keyCode==191 && e.stopImmediatePropagation();
  return false;
}, true);

Save, go reload page in question.. hey, works for me. Created/tested on Firefox 97. YMMV.

Fair warning, this is barely tested, no idea if it'll muck with unrelated browser behavior. Will edit this post if it needs patching.

hobocamp
  • 11
  • 1