搜尋 Mozilla 技術支援網站

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

了解更多

How to stop firefox from auto focusing on text boxes

  • 3 回覆
  • 1 有這個問題
  • 4 次檢視
  • 最近回覆由 cor-el

more options

There is an extremely annoying behavior of firefox, that it automatically focuses on text boxes when a page loads, even if the text does not have the html autofocus attribute. This wouldn't be so bad on its own, the main problem is that it happens after a big delay, up to a few seconds after the textbox has loaded. This frequently causes problems like me manually focusing the text box I want to use, start writing, and then mid-word firefox changes the focus to a totally different text box. It drives me up the wall, and I can't find a solution for it. I've tried disabling the browser.autofocus setting in about:config, to no avail because it's not being focused because of an autofocus attribute, also I tried adding the setting capability.policy.default.HTMLInputElement.focus;noAccess but this didn't work either. Please help

There is an extremely annoying behavior of firefox, that it automatically focuses on text boxes when a page loads, even if the text does not have the html autofocus attribute. This wouldn't be so bad on its own, the main problem is that it happens after a big delay, up to a few seconds after the textbox has loaded. This frequently causes problems like me manually focusing the text box I want to use, start writing, and then mid-word firefox changes the focus to a totally different text box. It drives me up the wall, and I can't find a solution for it. I've tried disabling the browser.autofocus setting in about:config, to no avail because it's not being focused because of an autofocus attribute, also I tried adding the setting capability.policy.default.HTMLInputElement.focus;noAccess but this didn't work either. Please help

所有回覆 (3)

more options

Try to toggle browser.autofocus to false on the about:config page. You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

more options

Thanks but as I said I've already tried that.cor-el said

Try to toggle browser.autofocus to false on the about:config page. You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

Thanks but as I said I've already tried that.

more options

If JavaScript is used to set focus to the field and not the autofocus attribute then only blocking this script could prevent this. If you know that a web page behaves this way then you will have to wait until the page has finished loading (no spinning throbber and a reload icon instead of the stop button). CAPS (capability.policy.default) prefs are no longer supported.