Index: ui/views/controls/link.cc |
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc |
index ec955b385979911957b4c951a59fe53d2357399d..1b9179b960d38d21ac763f711d6c0dbe5ef28c78 100644 |
--- a/ui/views/controls/link.cc |
+++ b/ui/views/controls/link.cc |
@@ -162,7 +162,7 @@ void Link::SetText(const base::string16& text) { |
// Disable focusability for empty links. Otherwise Label::GetInsets() will |
// give them an unconditional 1-px. inset on every side to allow for a focus |
// border, when in this case we probably wanted zero width. |
- SetFocusable(!text.empty()); |
+ SetFocusBehavior(text.empty() ? FocusBehavior::NEVER : FocusBehavior::ALWAYS); |
} |
void Link::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
@@ -200,7 +200,8 @@ void Link::Init() { |
// SetText() override will not be reached (because the constructed class is |
// only a Label at the moment, not yet a Link). So so the set_focusable() |
tapted
2016/04/20 04:16:28
`So so..` -> So set the focus behavior here as wel
karandeepb
2016/04/21 03:16:33
Done.
|
// call explicitly here. |
- SetFocusable(!text().empty()); |
+ SetFocusBehavior(text().empty() ? FocusBehavior::NEVER |
+ : FocusBehavior::ALWAYS); |
} |
void Link::SetPressed(bool pressed) { |