make pressing enter not reload riot when editable list is in form

pull/21833/head
Bruno Windels 2020-03-09 16:32:31 +01:00
parent 7079d70f18
commit 053ba1110a
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ export default class EditableItemList extends React.Component {
<Field id={`mx_EditableItemList_new_${this.props.id}`} label={this.props.placeholder} type="text"
autoComplete="off" value={this.props.newItem || ""} onChange={this._onNewItemChanged}
list={this.props.suggestionsListId} />
<AccessibleButton onClick={this._onItemAdded} kind="primary">
<AccessibleButton onClick={this._onItemAdded} kind="primary" type="submit">
{_t("Add")}
</AccessibleButton>
</form>