From: Alexander Ebert Date: Fri, 28 Jun 2013 16:31:05 +0000 (+0200) Subject: Fixed mention suggestions in Internet Explorer X-Git-Tag: 2.0.0_Beta_5~118^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e8098795b35eb9e4910da451d81c63f40fcac55;p=GitHub%2FWoltLab%2FWCF.git Fixed mention suggestions in Internet Explorer --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 93e4aa60a9..c7c7f335e2 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -3026,7 +3026,16 @@ WCF.Message.UserMention = Class.extend({ // to avoid split text nodes which were one node before inserting // the span element since split nodes can cause problems working // with ranges and remove merged text node - if (!$.browser.mozilla) { // firefox doesn't need this correction! + if ($.browser.msie) { + var $next = $($element).next(); + var $prev = $($element).prev(); + + if ($next.length && $prev.length) { + $prev.nodeValue += $next.nodeValue; + $next.remove(); + } + } + else if (!$.browser.mozilla) { // firefox doesn't need this correction! $element.previousSibling.nodeValue += $element.nextSibling.nodeValue; $($element.nextSibling).remove(); }