@amk221/ember-autofocus
v0.0.3
Published
An HTML autofocus solution for Ember apps
Downloads
4
Maintainers
Readme
ember-autofocus
HTML's autofocus
attribute focuses an element on page load.
However, in single page apps the page load event only happens once - so autofocus
pretty much becomes useless.
This addon provides you with a helper that focuses the first child contained within it.
Example
{{#if showField}}
{{#auto-focus}}
<input>
{{/auto-focus}}
{{/if}}
Optionally, you can set the disabled
attribute to true to prevent autofocusing.
Installation
git clone
this repositorynpm install
bower install
Running
ember server
- Visit your app at http://localhost:4200.
Running Tests
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.