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

This commit is contained in:
Bruno Windels 2020-03-09 16:32:31 +01:00
parent 7079d70f18
commit 053ba1110a

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>