From: Alexander Ebert Date: Sat, 18 Jun 2016 17:14:02 +0000 (+0200) Subject: Fixed image being relocated w/o being floated X-Git-Tag: 3.0.0_Beta_1~117^2~74 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1b0da8b2fa9e529d4b3c38734e09ba414f1c3039;p=GitHub%2FWoltLab%2FWCF.git Fixed image being relocated w/o being floated --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 6c89e02d5a..51796be594 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -631,7 +631,7 @@ RedactorPlugins.wmonkeypatch = function() { image = image.detach(); image.prependTo($parent); - this.caret.setAfter(image); + }).bind(this); this.image.update = (function(image) { @@ -640,7 +640,13 @@ RedactorPlugins.wmonkeypatch = function() { image.attr('src', $('#redactor-image-link-source').val()); this.image.setFloating(image); - $moveImage(image); + + var float = image.css('float'); + if (float === 'left' || float === 'right') { + $moveImage(image); + } + + this.caret.setAfter(image); var link = $('#redactor-image-link-href').val().trim(); var anchor = image.closest('a', this.$editor[0]);