mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
fixes autofocus on post edit
closes #5383 - sets the default focus of the editor component to false - removes the check for model.isNew in editor controller
This commit is contained in:
parent
5ec1979447
commit
b83ca04e72
3 changed files with 2 additions and 4 deletions
|
@ -6,7 +6,7 @@ import EditorScroll from 'ghost/mixins/ed-editor-scroll';
|
|||
var Editor;
|
||||
|
||||
Editor = Ember.TextArea.extend(EditorAPI, EditorShortcuts, EditorScroll, {
|
||||
focus: true,
|
||||
focus: false,
|
||||
|
||||
/**
|
||||
* Tell the controller about focusIn events, will trigger an autosave on a new document
|
||||
|
|
|
@ -236,7 +236,6 @@ export default Ember.Mixin.create({
|
|||
},
|
||||
|
||||
shouldFocusTitle: Ember.computed.alias('model.isNew'),
|
||||
shouldFocusEditor: Ember.computed.not('model.isNew'),
|
||||
|
||||
actions: {
|
||||
save: function (options) {
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
</header>
|
||||
<section id="entry-markdown-content" class="entry-markdown-content">
|
||||
{{gh-ed-editor classNames="markdown-editor js-markdown-editor" tabindex="1" spellcheck="true" value=model.scratch
|
||||
scrollInfo=view.editorScrollInfo focus=shouldFocusEditor focusCursorAtEnd=model.isDirty
|
||||
setEditor="setEditor" openModal="openModal" onFocusIn="autoSaveNew"}}
|
||||
scrollInfo=view.editorScrollInfo setEditor="setEditor" openModal="openModal" onFocusIn="autoSaveNew"}}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue