M
mitch
I'm trying to clear the currently selected
text on a page. This line works from IE:
document.selection.empty();
and this one from Firefox:
window.getSelection().removeAllRanges();
However it seems like neither works with Safari
1.2. In Safari, window.getSelection() is defined but
window.getSelection().removeAllRanges() is undefined.
Any ideas how to do the de-selection on Safari? Thanks.
text on a page. This line works from IE:
document.selection.empty();
and this one from Firefox:
window.getSelection().removeAllRanges();
However it seems like neither works with Safari
1.2. In Safari, window.getSelection() is defined but
window.getSelection().removeAllRanges() is undefined.
Any ideas how to do the de-selection on Safari? Thanks.