diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.js b/app/javascript/mastodon/features/ui/components/focal_point_modal.js index a2e6b3d16..ba8aa8f03 100644 --- a/app/javascript/mastodon/features/ui/components/focal_point_modal.js +++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.js @@ -176,14 +176,14 @@ class FocalPointModal extends ImmutablePureComponent { handleKeyDown = (e) => { if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { - e.preventDefault(); - e.stopPropagation(); this.props.onChangeDescription(e.target.value); - this.handleSubmit(); + this.handleSubmit(e); } } - handleSubmit = () => { + handleSubmit = (e) => { + e.preventDefault(); + e.stopPropagation(); this.props.onSave(this.props.description, this.props.focusX, this.props.focusY); } @@ -313,7 +313,7 @@ class FocalPointModal extends ImmutablePureComponent {