| Index: third_party/WebKit/Source/core/page/FocusController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| index 217b52178ece193c1a0bd537541765afc5ff7e04..7e77fe49a37135adefe33a1bc9babd19b52ac773 100644
|
| --- a/third_party/WebKit/Source/core/page/FocusController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| @@ -1342,9 +1342,11 @@ bool FocusController::AdvanceFocusDirectionallyInContainer(
|
| DCHECK(element);
|
|
|
| if (!element->IsTextControl() && !HasEditableStyle(*element->ToNode())) {
|
| - // To fulfill the expectation of spatial-navigation/snav-input.html
|
| + // To fulfill the expectation of spatial-navigation/snav-textarea.html
|
| // we clear selection when spatnav moves focus away from a text-field.
|
| - FocusedFrame()->Selection().Clear();
|
| + // TODO(hugoh@opera.com): crbug.com/734552 remove Selection.Clear()
|
| + if (FocusedFrame())
|
| + FocusedFrame()->Selection().Clear();
|
| }
|
| element->focus(FocusParams(SelectionBehaviorOnFocus::kReset, type, nullptr));
|
| return true;
|
|
|