diff --git a/server/src/pages/shot/view.js b/server/src/pages/shot/view.js index bf073ca5b3..c347daa985 100644 --- a/server/src/pages/shot/view.js +++ b/server/src/pages/shot/view.js @@ -697,7 +697,7 @@ class EditableTitle extends React.Component { className="shot-title-input" style={{minWidth: this.state.minWidth}} type="text" defaultValue={this.props.title} autoFocus="true" - onBlur={this.onExit.bind(this)} onKeyUp={this.onKeyUp.bind(this)} /> + onBlur={this.onExit.bind(this)} onKeyUp={this.onKeyUp.bind(this)} onFocus={this.onFocus} /> ; } @@ -714,6 +714,10 @@ class EditableTitle extends React.Component { this.setState({isEditing: false, isSaving: val}); } + onFocus(event) { + event.target.select(); + } + onKeyUp(event) { if ((event.key || event.code) === "Escape") { this.setState({isEditing: false});