From eedbdb6ddcd8b0d9b48a1cf3fd04f80a6dae0fbb Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 28 Sep 2016 12:41:17 +0200 Subject: [PATCH] Fix caret position after image update --- .../files/js/3rdParty/redactor2/plugins/WoltLabImage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js index 8e44e783ed..64d31a98f7 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js @@ -67,11 +67,13 @@ $.Redactor.prototype.WoltLabImage = function() { image.classList.add('messageFloatObject' + WCF.String.ucfirst(float)); } - mpUpdate(); + mpUpdate.call(this); // remove alt/title attribute again (not supported) image.removeAttribute('alt'); image.removeAttribute('title'); + + this.caret.after(image); }).bind(this); // overwrite modal template -- 2.20.1