Force blur the editor after replying with a message
authorAlexander Ebert <ebert@woltlab.com>
Wed, 29 Sep 2021 12:06:46 +0000 (14:06 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 29 Sep 2021 12:06:46 +0000 (14:06 +0200)
See https://community.woltlab.com/thread/292195-probleme-mit-opera-mobile-unter-android/

ts/WoltLabSuite/Core/Ui/Message/Reply.ts

index 0deada02a113c081994955770cada6449f8e6b16..98dfe9145a489a1a40c572d608dca8192b1cabfc 100644 (file)
@@ -278,6 +278,8 @@ class UiMessageReply {
     // causing the keyboard to vanish, but the focus remains inside the editor.
     window.setTimeout(() => {
       const editor = document.activeElement?.closest(".redactor-layer");
+      if (editor && editor instanceof HTMLElement) {
+        editor.blur();
       }
     }, 50);
   }