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,6 +282,7 @@ class EditableListItem extends Component<
} }
private handleEditBegin () { private handleEditBegin () {
if (!this.state.editing) {
this.setState({ this.setState({
editing: true editing: true
, editValue: this.props.text , editValue: this.props.text
@@ -290,6 +291,7 @@ class EditableListItem extends Component<
this.input?.select(); this.input?.select();
}); });
} }
}
private handleEditEnd (ev: React.FocusEvent<HTMLInputElement>) { private handleEditEnd (ev: React.FocusEvent<HTMLInputElement>) {
this.stopEditing(ev.target); this.stopEditing(ev.target);