From: Alexander Ebert Date: Wed, 28 Sep 2016 10:41:17 +0000 (+0200) Subject: Fix caret position after image update X-Git-Tag: 3.0.0_Beta_2~88 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eedbdb6ddcd8b0d9b48a1cf3fd04f80a6dae0fbb;p=GitHub%2FWoltLab%2FWCF.git Fix caret position after image update --- 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