From 290d57d6d9c663b570f72df397152d7d63880392 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 20 Mar 2025 00:29:26 +0100 Subject: [PATCH] Prevent duplicate REST API requests on submitting account personal note with ctrl+enter (#34213) --- .../mastodon/features/account/components/account_note.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/account/components/account_note.jsx b/app/javascript/mastodon/features/account/components/account_note.jsx index 84fd6beeff..df7312eafc 100644 --- a/app/javascript/mastodon/features/account/components/account_note.jsx +++ b/app/javascript/mastodon/features/account/components/account_note.jsx @@ -101,10 +101,10 @@ class AccountNote extends ImmutablePureComponent { if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { e.preventDefault(); - this._save(); - if (this.textarea) { this.textarea.blur(); + } else { + this._save(); } } else if (e.keyCode === 27) { e.preventDefault();