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 () {
this.setState({
editing: true
, editValue: this.props.text
}, () => {
this.input?.focus();
this.input?.select();
});
if (!this.state.editing) {
this.setState({
editing: true
, editValue: this.props.text
}, () => {
this.input?.focus();
this.input?.select();
});
}
}
private handleEditEnd (ev: React.FocusEvent<HTMLInputElement>) {