mcauer / browserscope

Automatically exported from code.google.com/p/browserscope
Apache License 2.0
0 stars 0 forks source link

Do not test unselect command #325

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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