Ember-cli-focus-input is a set of ember components that provide autofocus (the first input of your form/page).
The HTML5 input autofocus attribute does not work properly for Ember applications. It just lets you specify that a form control should have input focus when the page loads. That's why the attribute does not work properly for single page applications (SPA's).
As any other ember-cli addon, run:
$ ember install ember-cli-focus-input
{{focus-input value=model.field class="foo"}}
By default the input will be focused and have the content selected. If you prefer not to have the text selected/highlighted configure it like so.
{{focus-input value=model.field class="foo" select="false"}}
{{focus-button value=model.buttonField class="bar"}}
npm install (or yarn install)
ember test
ember try:each (test against multiple ember versions defined in config/ember-try.js)
Copyright © 2016 Brandon Williams http://williamsbdev.com
Licensed under the MIT License