diff --git a/ghost/admin/app/components/gh-koenig-editor-lexical.hbs b/ghost/admin/app/components/gh-koenig-editor-lexical.hbs index 76a707e387..af3524b998 100644 --- a/ghost/admin/app/components/gh-koenig-editor-lexical.hbs +++ b/ghost/admin/app/components/gh-koenig-editor-lexical.hbs @@ -68,14 +68,14 @@ @value={{readonly this.excerpt}} @input={{this.onExcerptInput}} @keyDown={{this.onExcerptKeydown}} - @didCreateTextarea={{this.registerSubtitleElement}} + @didCreateTextarea={{this.registerExcerptElement}} data-test-textarea="excerpt" /> {{#if @excerptHasTk}}
TK
@@ -96,7 +96,7 @@ @cardConfig={{@cardOptions}} @onChange={{@onBodyChange}} @registerAPI={{this.registerEditorAPI}} - @cursorDidExitAtTop={{if this.feature.editorExcerpt this.focusSubtitle this.focusTitle}} + @cursorDidExitAtTop={{if this.feature.editorExcerpt this.focusExcerpt this.focusTitle}} @updateWordCount={{@updateWordCount}} @updatePostTkCount={{@updatePostTkCount}} /> diff --git a/ghost/admin/app/components/gh-koenig-editor-lexical.js b/ghost/admin/app/components/gh-koenig-editor-lexical.js index 4521b5fa74..8dcf8d6d35 100644 --- a/ghost/admin/app/components/gh-koenig-editor-lexical.js +++ b/ghost/admin/app/components/gh-koenig-editor-lexical.js @@ -4,7 +4,7 @@ import {action} from '@ember/object'; import {inject as service} from '@ember/service'; import {tracked} from '@glimmer/tracking'; -export default class GhKoenigEditorReactComponent extends Component { +export default class GhKoenigEditorLexical extends Component { @service settings; @service feature; @@ -114,7 +114,7 @@ export default class GhKoenigEditorReactComponent extends Component { @action onTitleKeydown(event) { - if (this.feature.get('editorExcerpt')) { + if (this.feature.editorExcerpt) { // move cursor to the excerpt on // - Tab (handled by browser) // - Arrow Down/Right when input is empty or caret at end of input @@ -167,12 +167,12 @@ export default class GhKoenigEditorReactComponent extends Component { // Subtitle ("excerpt") Actions ------------------------------------------- @action - excerptSubtitleElement(element) { + registerExcerptElement(element) { this.excerptElement = element; } @action - focusSubtitle() { + focusExcerpt() { this.excerptElement?.focus(); // timeout ensures this occurs after the keyboard events