Index: Source/core/html/HTMLTextFormControlElement.cpp |
=================================================================== |
--- Source/core/html/HTMLTextFormControlElement.cpp (revision 192381) |
+++ Source/core/html/HTMLTextFormControlElement.cpp (working copy) |
@@ -348,7 +348,7 @@ |
void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextFieldSelectionDirection direction, NeedToDispatchSelectEvent eventBehaviour, SelectionOption selectionOption) |
{ |
- if (hasOpenShadowRoot() || !isTextFormControl()) |
+ if (hasOpenShadowRoot() || !isTextFormControl() || !inDocument()) |
return; |
const int editorValueLength = static_cast<int>(innerEditorValue().length()); |