Update the JavaScript artifact
authorAlexander Ebert <ebert@woltlab.com>
Mon, 21 Aug 2023 12:41:50 +0000 (14:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 21 Aug 2023 12:41:50 +0000 (14:41 +0200)
`npx tsc -w` somehow stopped updating …

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor.js

index 2033785a475303371dc3331b900d43e22416bd9e..820b20c926e90ffb263f7b5c3a44bd2be0d8ebbf 100644 (file)
@@ -94,9 +94,14 @@ define(["require", "exports", "tslib", "./Ckeditor/Attachment", "./Ckeditor/Medi
                 ckeditor: this,
             });
             if ((0, Environment_1.browser)() === "safari" && !(0, Environment_1.touch)()) {
+                // Safari sometimes suffers from a “reverse typing” effect caused by the
+                // improper shift of the focus out of the editing area.
+                // https://github.com/ckeditor/ckeditor5/issues/14702
                 const editor = this.#editor.ui.element;
                 editor.focus();
-                editor.blur();
+                window.setTimeout(() => {
+                    editor.blur();
+                }, 0);
             }
         }
         get element() {