diff --git a/app/javascript/mastodon/features/lists/components/new_list_form.js b/app/javascript/mastodon/features/lists/components/new_list_form.js index 0054e5264f..eed6efc253 100644 --- a/app/javascript/mastodon/features/lists/components/new_list_form.js +++ b/app/javascript/mastodon/features/lists/components/new_list_form.js @@ -36,10 +36,9 @@ export default class NewListForm extends React.PureComponent { this.props.onChange(e.target.value); } - handleKeyUp = e => { - if (e.keyCode === 13) { - this.props.onSubmit(); - } + handleSubmit = e => { + e.preventDefault(); + this.props.onSubmit(); } handleClick = () => { @@ -53,7 +52,7 @@ export default class NewListForm extends React.PureComponent { const title = intl.formatMessage(messages.title); return ( -
+
@@ -73,7 +71,7 @@ export default class NewListForm extends React.PureComponent { title={title} onClick={this.handleClick} /> -
+ ); } diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 5eeefae4d3..a582d26287 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4467,6 +4467,10 @@ noscript { input { width: 100%; margin-bottom: 6px; + + &:focus { + outline: 0; + } } }