mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
Merge pull request #5386 from acburdine/focus-fix
Fix autofocus on post edit
This commit is contained in:
commit
c8a49033a5
@ -6,7 +6,7 @@ import EditorScroll from 'ghost/mixins/ed-editor-scroll';
|
|||||||
var Editor;
|
var Editor;
|
||||||
|
|
||||||
Editor = Ember.TextArea.extend(EditorAPI, EditorShortcuts, EditorScroll, {
|
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
|
* 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'),
|
shouldFocusTitle: Ember.computed.alias('model.isNew'),
|
||||||
shouldFocusEditor: Ember.computed.not('model.isNew'),
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
save: function (options) {
|
save: function (options) {
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<section id="entry-markdown-content" class="entry-markdown-content">
|
<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
|
{{gh-ed-editor classNames="markdown-editor js-markdown-editor" tabindex="1" spellcheck="true" value=model.scratch
|
||||||
scrollInfo=view.editorScrollInfo focus=shouldFocusEditor focusCursorAtEnd=model.isDirty
|
scrollInfo=view.editorScrollInfo setEditor="setEditor" openModal="openModal" onFocusIn="autoSaveNew"}}
|
||||||
setEditor="setEditor" openModal="openModal" onFocusIn="autoSaveNew"}}
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user