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!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

"Search as you type" conflicts with addEventListener

  • 7 replies
  • 1 has this problem
  • 2 views
  • Paskiausią atsakymą parašė 10basetom

more options

When I enable the "Search for text when you start typing" option in Firefox Quantum (v59.0.1 64-bit), document.addEventListener('keyup', handler) does NOT work on web pages. I think this feature is conflicting with JavaScript events.

When I enable the "Search for text when you start typing" option in Firefox Quantum (v59.0.1 64-bit), document.addEventListener('keyup', handler) does NOT work on web pages. I think this feature is conflicting with JavaScript events.

All Replies (7)

more options

Hi please update to current version 59.0.2 https://support.mozilla.org/en/kb/update-firefox-latest-version

  • Repair System Registry and Files

Find the Dos Prompt Right or Powershell Click and Run as Administrator then : Copy/Paste to Dos Window : DISM /Online /Cleanup-Image /RestoreHealth then hit Enter. Reboot when completed. Note : DISM goes up to Microsoft for new ones

Always make backups :

Please let us know if this solved your issue or if need further assistance.

more options

I'm on 59.0.2 now -- same problem :(.

more options

Your observation appears to be correct: Firefox intercepts the keys and directs them toward a Quick Find bar instead of the document. The document never sees those key events, except perhaps the keydown for the first key pressed by the user.

I was re-using this fiddle for testing: https://jsfiddle.net/e4berr36/20/

more options

Yeah, I hope the Mozilla team is listening because it's a serious problem -- basically any webapp, website, or extension that relies on keyboard events for hotkeys will not work as expected when this feature is enabled.

more options

I guess it depends on what hotkeys sites use. The "Find as You Type" feature should not do anything if the user presses a key combination using Ctrl or Alt.

Also, does anyone use this setting on a regular basis? It's so annoying!

Modified by jscher2000 - Support Volunteer

more options

Nothing was picked up at all from my tests, which means combos using Ctrl/Alt won't work either.

more options

10basetom said

Nothing was picked up at all from my tests, which means combos using Ctrl/Alt won't work either.

Ah, never mind -- most combos work. The one I tried (Alt+X) didn't work because it's used by something else.

Still, IMHO this feature should not block normal JavaScript functionality. The least they can do is put a big notice on MDN or the Quantum page marketing this feature.