| Index: views/controls/button/custom_button.cc
|
| diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
|
| index 534c8a4170718ce45615caf0f191f06a56a23122..8bf68b21ee30bccc8f75a87553be3507c32cc44f 100644
|
| --- a/views/controls/button/custom_button.cc
|
| +++ b/views/controls/button/custom_button.cc
|
| @@ -74,7 +74,8 @@ CustomButton::CustomButton(ButtonListener* listener)
|
| : Button(listener),
|
| state_(BS_NORMAL),
|
| animate_on_state_change_(true),
|
| - triggerable_event_flags_(MouseEvent::EF_LEFT_BUTTON_DOWN) {
|
| + triggerable_event_flags_(MouseEvent::EF_LEFT_BUTTON_DOWN),
|
| + request_focus_on_press_(true) {
|
| hover_animation_.reset(new ThrobAnimation(this));
|
| hover_animation_->SetSlideDuration(kHoverFadeDurationMs);
|
| }
|
| @@ -101,7 +102,8 @@ bool CustomButton::OnMousePressed(const MouseEvent& e) {
|
| if (state_ != BS_DISABLED) {
|
| if (ShouldEnterPushedState(e) && HitTest(e.location()))
|
| SetState(BS_PUSHED);
|
| - RequestFocus();
|
| + if (request_focus_on_press_)
|
| + RequestFocus();
|
| }
|
| return true;
|
| }
|
|
|