Ignore concurrent edit requests for the same element
authorAlexander Ebert <ebert@woltlab.com>
Fri, 28 Jul 2023 14:00:03 +0000 (16:00 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 28 Jul 2023 14:00:03 +0000 (16:00 +0200)
See https://www.woltlab.com/community/thread/300685-der-editor-ist-bereits-aktiv-bei-langsamer-internetverbindung/

ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js

index 93f81afe38b2e417c28b1e85222472285a23d06c..77a5173b8171713a6e667fcd45c8fa1e0b8a2291 100644 (file)
@@ -159,7 +159,7 @@ class UiMessageInlineEditor implements AjaxCallbackObject {
           objectID: this._getObjectId(element!),
         },
       });
-    } else {
+    } else if (this._activeElement !== element) {
       UiNotification.show("wcf.message.error.editorAlreadyInUse", undefined, "warning");
     }
   }
index 9f3ebb6178709d8db9274d193af019b4b32c67c0..65a91f9367b83ad71defa55345cedd37c8cf4f22 100644 (file)
@@ -112,7 +112,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Component/Ckeditor/Eve
                     },
                 });
             }
-            else {
+            else if (this._activeElement !== element) {
                 UiNotification.show("wcf.message.error.editorAlreadyInUse", undefined, "warning");
             }
         }