Fix issue with double-clicking whitelist field whilst editing

This commit is contained in:
hensm
2020-08-19 22:52:13 +01:00
parent f7d55cdb03
commit d25450f7bd

View File

@@ -282,13 +282,15 @@ class EditableListItem extends Component<
} }
private handleEditBegin () { private handleEditBegin () {
this.setState({ if (!this.state.editing) {
editing: true this.setState({
, editValue: this.props.text editing: true
}, () => { , editValue: this.props.text
this.input?.focus(); }, () => {
this.input?.select(); this.input?.focus();
}); this.input?.select();
});
}
} }
private handleEditEnd (ev: React.FocusEvent<HTMLInputElement>) { private handleEditEnd (ev: React.FocusEvent<HTMLInputElement>) {