
Hi,
We have a custom tool in the editor to remove "comments", this works when I simulate IE 7 and works great in Chrome. When I click the button in IE 10 the browser crashes without any details.
If I debug the code it seems like it is working, the crash seems to happen in RadEditor.js when the checkElementsRecursively() is done.
Do you have any clue whats happend? I guess it has to do with the removed element.
sb.Append("Telerik.Web.UI.Editor.CommandList[\"StripOneSpan\"] = function(commandName, editor, args){");
sb.Append("var theSelectedElement = editor.getSelectedElement();");
sb.Append("checkElementsRecursively(theSelectedElement)");
sb.Append("};");
And the JS-code:
function checkElementsRecursively(selElement) {
if ((selElement.tagName == "FONT" || selElement.tagName == "font" || selElement.tagName == "SPAN" || selElement.tagName == "span") && selElement.attributes["id"] != null && selElement.attributes["id"].value.substring(7, 0) == "abccom_" && selElement.parentNode != null) {
selElement.parentNode.removeChild(selElement);
}
}
7 Answers, 1 is accepted
I tried to reproduce the problem but without success as shown at https://www.screencast.com/t/Pb8qg7JeoLZ.
Do you experience the problem with the latest version 2017.2.711?
What's your version of IE10?
Best regards,
Rumen
Progress Telerik

Hi, thanks for your reply!
The two versions of IE i tried with is:
IE 10 (10.0.9200.16521)
IE 11 (11.0.9600.18763) (in IE 10 mode)
And Telerik versions:
2017.2.711
2015.1.401.45
If I remove this line of code everything works great. And if I debug past the line it also works.
selElement.parentNode.removeChild(selElement);
Hi there,
I would suggest an improvement in the parent element node check:
replace selElement.parentNode != null
with selElement.parentNode:
function
checkElementsRecursively(selElement) {
if
((selElement.tagName ==
"FONT"
|| selElement.tagName ==
"font"
|| selElement.tagName ==
"SPAN"
|| selElement.tagName ==
"span"
) && selElement.attributes[
"id"
] !=
null
&& selElement.attributes[
"id"
].value.substring(7, 0) ==
"abccom_"
&& selElement.parentNode) {
selElement.parentNode.removeChild(selElement);
}
}
This should do the trick.
Regards,
RumenProgress Telerik

This is really strange...
from computer #1 with IE 10 and Telerik version 2015.1.401.45 it works now without any changes to the code. (reproduced the issue several times before.)
Computer #2 IE 11 and Telerik version 2015.1.401.45, it doesnt work
Computer #3 IE 11 and Telerik version 2015.1.401.45, it doesnt work, with version 2017.2.711 it works now..
I tried your suggestion with computer #2 and it does not work.
Unfortunately I am also unable to replicate the issue on my end.
Can it be an IE compatibility issue? Can you check whether the page is rendered in native IE mode inside the emulator tab of the IE dev console?
Best regards,
RumenProgress Telerik

Ok,
On both computer #1, #2 it is: IE 10 compatibility mode (think this is set by the clients IT department where we got the computers from) the strange thing is that it was not working on #1 from the beginning, that feels like som client-issue if it works now? Dont really know what it should be looking for.
Regarding this you have two options:
- try to force native mode with the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
as suggested here.
- ask the administrators to force native mode, if the network policy overrides the meta tag setting.
Regards,
Rumen
Progress Telerik