From 0e8098795b35eb9e4910da451d81c63f40fcac55 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 28 Jun 2013 18:31:05 +0200 Subject: [PATCH] Fixed mention suggestions in Internet Explorer --- wcfsetup/install/files/js/WCF.Message.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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(); } -- 2.20.1