Changed editor title input to treat '(Untitled)' as blank
refs https://github.com/TryGhost/Team/issues/707 - the switch to a hard `'(Untitled)'` when you start typing is jarring and pulls you away from writing to want to set a title - by changing the input to treat '(Untitled)' as a blank value the placeholder continues to be shown so flow isn't broken. Post validation and title display elsewhere in the app is unaffected because we're still setting `'(Untitled')` under the hood, it's only the editor display that changes
This commit is contained in:
parent
6d66c2cc73
commit
a5dd92f1b8
@ -10,7 +10,7 @@
|
||||
@placeholder={{@titlePlaceholder}}
|
||||
@tabindex="1"
|
||||
@autoExpand=".gh-koenig-editor"
|
||||
@value={{readonly @title}}
|
||||
@value={{readonly this.title}}
|
||||
@input={{this.updateTitle}}
|
||||
@focus-out={{optional @onTitleBlur}}
|
||||
@keyDown={{this.onTitleKeydown}}
|
||||
|
@ -7,6 +7,10 @@ export default class GhKoenigEditorComponent extends Component {
|
||||
koenigEditor = null;
|
||||
mousedownY = 0;
|
||||
|
||||
get title() {
|
||||
return this.args.title === '(Untitled)' ? '' : this.args.title;
|
||||
}
|
||||
|
||||
@action
|
||||
registerElement(element) {
|
||||
this.containerElement = element;
|
||||
|
Loading…
Reference in New Issue
Block a user