At least one richtext2 test (RTE2-S_UNSEL_TEXT-1_SI) tests that the unselect
command works. In the editing spec, when researching commands supported by
different browsers, I deliberately declined to spec this command, as noted in
the spec comments:
"""
unselect: Seems to not be implemented by Gecko or Opera, and IE behaves oddly:
it seems to collapse the selection instead of removing it. Will only implement
if there seems to be demand; it's redundant to Selection.removeAllRanges()
anyway.
"""
http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#issues
(Click "View comments" at the bottom of that section.)
Is there any advantage to document.execCommand("unselect") over
getSelection().removeAllRanges()? The latter is already implemented
interoperably, and the former is not. If unselect does the same thing as
removeAllRanges(), it's unneeded complication and should be removed from
richtext2. If there's some use for it that I'm not aware of, I'll add it to
the spec.
Thanks!
Original issue reported on code.google.com by Simetrical on 6 Apr 2012 at 9:29
Original issue reported on code.google.com by
Simetrical
on 6 Apr 2012 at 9:29