1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/templates/components/gh-koenig-editor.hbs
Kevin Ansfield 9c57402030 Koenig - Fixed jump-to-top bug when focusing editor
refs https://github.com/TryGhost/Ghost/issues/9311
- the editor was being focused and the cursor placed properly but the act of focusing also reset the scroll position
- pulled the `.gh-koenig-editor` class into the component rather than leaving it in the template so that the component has access to `this.element`
- ensure the `.gh-koenig-editor` container is scrolled all the way to the bottom after focusing the editor
2018-01-30 21:09:46 +00:00

23 lines
685 B
Handlebars

{{!-- full height content pane --}}
<div class="gh-koenig-editor-pane" onclick={{action "focusEditor"}}>
{{gh-textarea title
class="gh-editor-title"
placeholder=titlePlaceholder
tabindex="1"
autoExpand=".gh-koenig-editor"
update=(action "onTitleChange")
focusOut=(action "onTitleFocusOut")
keyDown=(action "onTitleKeydown")
didCreateTextarea=(action "onTitleCreated")
}}
{{koenig-editor
mobiledoc=body
placeholder=bodyPlaceholder
autofocus=bodyAutofocus
spellcheck=true
onChange=(action "onBodyChange")
didCreateEditor=(action "onEditorCreated")
}}
</div>