Цей вебсайт матиме обмежену функціональність, доки ми проводимо його обслуговування для поліпшення роботи. Якщо прочитана стаття не розв'язала вашу проблему і ви хочете поставити питання, наша спільнота підтримки з радістю допоможе вам на @FirefoxSupport у Twitter та /r/firefox на Reddit.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

How can I disable autofocus for the input tag?

  • 2 відповіді
  • 2 мають цю проблему
  • 1 перегляд
  • Остання відповідь від moulton

more options

Some abusive Google AdWords ads exploit the input tag's autofocus attribute to override links to internal anchors deep in the page.

When I follow a link such as: http://www.example.com/page.html#paragraph5

This should set the top of the page as the internal link with name (HTML4 or less) or id (HTML5) "paragraph5". This has been the case pretty much since the invention of HTML.

Unfortunately, HTML5 introduced the attribute "autofocus" to the input tag. Some abusive advertisers have noticed that they can exploit this to override the behavior of the actual website, and scroll the page to focus on the advertisement instead of the site's content.

Here is an example of an obnoxious, abusive AdWord advertisement from Adobe: https://s0.2mdn.net/ads/richmedia/studio/pv2/40930760/20160126194122120/AdobeStock728x90.html?e=69&renderingType=2&leftOffset=0&topOffset=0&c=8dPnUcilTf&t=1

Google AdWords is not going to police this abusive behavior. Google likes it when people view its advertisements instead of actual site content.

It is possible for the owner of a website to individually ban certain advertisements from his website. However, there is no way for an individual who does not own a website to ban certain Google AdWords advertisements from a website he frequents.

I find the "autofocus" attribute to be completely useless for normal browsing and highly obnoxious when misused by abusive advertisers. It is very likely that more and more advertisers will use this trick to break websites. Therefore, I would like a way to completely disable / ignore the "autofocus" attribute within Firefox.

How can I do this? Is there a configuration I can change? Is there an Add-On I can install?

Some abusive Google AdWords ads exploit the input tag's autofocus attribute to override links to internal anchors deep in the page. When I follow a link such as: http://www.example.com/page.html#paragraph5 This should set the top of the page as the internal link with name (HTML4 or less) or id (HTML5) "paragraph5". This has been the case pretty much since the invention of HTML. Unfortunately, HTML5 introduced the attribute "autofocus" to the input tag. Some abusive advertisers have noticed that they can exploit this to override the behavior of the actual website, and scroll the page to focus on the advertisement instead of the site's content. Here is an example of an obnoxious, abusive AdWord advertisement from Adobe: https://s0.2mdn.net/ads/richmedia/studio/pv2/40930760/20160126194122120/AdobeStock728x90.html?e=69&renderingType=2&leftOffset=0&topOffset=0&c=8dPnUcilTf&t=1 Google AdWords is not going to police this abusive behavior. Google likes it when people view its advertisements instead of actual site content. It is possible for the owner of a website to individually ban certain advertisements from his website. However, there is no way for an individual who does not own a website to ban certain Google AdWords advertisements from a website he frequents. I find the "autofocus" attribute to be completely useless for normal browsing and highly obnoxious when misused by abusive advertisers. It is very likely that more and more advertisers will use this trick to break websites. Therefore, I would like a way to completely disable / ignore the "autofocus" attribute within Firefox. How can I do this? Is there a configuration I can change? Is there an Add-On I can install?

Обране рішення

You can set 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.

Читати цю відповідь у контексті 👍 3

Усі відповіді (2)

more options

Вибране рішення

You can set 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! That seemed to solve the issue -- at least for Firefox.