Index: Source/WebCore/page/DOMSelection.cpp |
=================================================================== |
--- Source/WebCore/page/DOMSelection.cpp (revision 105345) |
+++ Source/WebCore/page/DOMSelection.cpp (working copy) |
@@ -421,7 +421,7 @@ |
} |
} else { |
// We don't support discontiguous selection. We don't do anything if r and range don't intersect. |
- if (r->compareBoundaryPoints(Range::END_TO_START, range.get(), ec) < 1) { |
+ if (r->compareBoundaryPoints(Range::END_TO_START, range.get(), ec) < 1 && !ec) { |
if (r->compareBoundaryPoints(Range::END_TO_END, range.get(), ec) == -1) |
// The original range contains r. |
selection->setSelection(VisibleSelection(range.get())); |