From cc292c1e229f1e4097bed2ca06ac7550e6c35df0 Mon Sep 17 00:00:00 2001 From: Isaac Salier-Hellendag Date: Thu, 24 Apr 2014 11:37:55 -0700 Subject: [PATCH] Fix IE11 collapsed ranges in ReactDOMSelection In IE10/11, it is apparently possible to have a Selection or Range object that has the following properties: - `anchorNode` === `focusNode` (Selection) or `startContainer` === `endContainer` (Range) - `anchorOffset` === `focusOffset` (Selection) or `startOffset` === `endOffset` (Range) - `isCollapsed` === `false` (Selection) or `collapsed` === `false` (Range) As defined in http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html, this doesn't really make sense. Since the nodes and offsets are the same, the "collapsed" value should be `true`. Moreover, when calling `selection.toString()` in this case, it appears that the entire text contents of `body` -- including `