From e63d474eb85f0cb14d228f45f827d244f0b5609d Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 20 Mar 2025 00:29:26 +0100 Subject: [PATCH] [Glitch] Prevent duplicate REST API requests on submitting account personal note with ctrl+enter Port 290d57d6d9c663b570f72df397152d7d63880392 to glitch-soc Signed-off-by: Claire --- .../glitch/features/account/components/account_note.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account/components/account_note.jsx b/app/javascript/flavours/glitch/features/account/components/account_note.jsx index 84fd6beeff..df7312eafc 100644 --- a/app/javascript/flavours/glitch/features/account/components/account_note.jsx +++ b/app/javascript/flavours/glitch/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();