firefox ,光标
var selection = this.ifr.contentWindow.getSelection();
var range;
if (selection) {
range = selection.getRangeAt(0) ;
} else { 🎜> oLastNode = oFragment.lastChild; / / Used to correct the position of the editing cursor
Range.insertNode(oFragment);
range.setEndAfter(oLastNode); //Place the editing cursor after we insert the content
Range.setStartAfter(oLastNode);
selection.removeAllRanges(); //Clear all selections, otherwise the content we inserted and the text just now are selected
selection.addRange(range); //Insert content
this.edc.body. focus();
Is there anything wrong with this code? Why do icons disappear in Firefox? I beg God to tell me the reason.
Reply to the discussion (solution)
Isn’t there anyone who can give me some advice?
This is a JS problem, please post it to the JS forum.
JS section not found
There is a javascript section in the web development section