I have this function
function smth() { var container = null; var newContainer = null; if (window.getSelection) { // all browsers, except IE before versi
For the problematic browser:
document.selection.empty()
For other browsers:
window.getSelection().removeAllRanges()
See http://help.dottoro.com/ljigixkc.php