搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

"Search as you type" conflicts with addEventListener

  • 7 回覆
  • 1 有這個問題
  • 2 次檢視
  • 最近回覆由 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.

所有回覆 (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!

由 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.