Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Remove autofocus from Brooklyn 2014 theme

Gabriel Guzman edited this page Mar 25, 2015 · 2 revisions

As part of Web Store 3.2.5 the autofocus was removed from brooklyn 2014 inputs. The changes can be seen on the account pages inputs as well as the search, login, and wishlist pages inputs. If you've made a copy of brooklyn2014 typically you will not get this change.

We decided to remove the autofocus when we noticed that some users didn't like the way it was interacting with their general scrolling experience on the page and was opening the soft keyboard.

If you want to remove the autofocus feature, go in the following files in core/protected/views-cities3(for self-hosted) or themes/brooklyn2014copy(for anybody who made a copy of brooklyn2014):

  • /myaccount/address.php
  • /myaccount/edit.php
  • /myaccount/password.php
  • /search/index.php
  • /site/login.php
  • /wishlist/_edititem.php
  • /wishlist/_sharelist.php
  • /wishlist/search.php

and remove the following line near the top of each file

      'focus'=>array($model,'<string>'),

Note: will differ on each page to refer to the first input of each page

Clone this wiki locally