Focus title in editor when opening page.

closes #3038
- Adds new gh-focus-input component
- Uses new component in editor
This commit is contained in:
Fabian Becker 2014-06-23 14:27:09 +00:00
parent 79c2132905
commit 9a08ff3216
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,7 @@
var FocusInput = Ember.TextField.extend({
becomeFocused: function () {
this.$().val(this.$().val()).focus();
}.on('didInsertElement')
});
export default FocusInput;

View File

@ -1,6 +1,6 @@
<header>
<section class="box entry-title">
{{input type="text" id="entry-title" placeholder="Your Post Title" value=title tabindex="1"}}
{{gh-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=title tabindex="1"}}
</section>
</header>