| Index: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
|
| index f8125195c8b6a9f5bc74c63e818f1268e20cd711..1d64b3d7c29eb0313511f84df2910aab05aceebc 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
|
| @@ -190,7 +190,10 @@ void HTMLTextFormControlElement::setSelectionDirection(const String& direction)
|
| void HTMLTextFormControlElement::select()
|
| {
|
| setSelectionRangeForBinding(0, std::numeric_limits<int>::max());
|
| - focus();
|
| + // Avoid SelectionBehaviorOnFocus::Restore, which scrolls containers to show
|
| + // the selection.
|
| + focus(FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr));
|
| + restoreCachedSelection();
|
| }
|
|
|
| bool HTMLTextFormControlElement::shouldDispatchFormControlChangeEvent(String& oldValue, String& newValue)
|
|
|