Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js |
| index 9f3fb088f76a98154fdfa0670d73a033e37dde11..155672b178a906fd6c1c4089d12fd27c379c67b7 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js |
| @@ -322,7 +322,7 @@ WebInspector.TabbedPane.prototype = { |
| { |
| if (this._currentTabLocked) |
| return false; |
| - var focused = this.hasFocus(); |
| + var shouldFocus = this.hasFocus() || !WebInspector.currentFocusElement(); |
|
dgozman
2016/05/27 01:05:59
This looks strange. The logic here was preserving
lushnikov
2016/05/27 01:14:44
maybe focusing iff userGesture would work as well
luoe
2016/05/27 23:20:40
Almost, but it didn't cover all the cases.
luoe
2016/05/27 23:20:40
Yeah, it is strange. The condition has been rever
|
| var tab = this._tabsById[id]; |
| if (!tab) |
| return false; |
| @@ -337,7 +337,7 @@ WebInspector.TabbedPane.prototype = { |
| this._tabsHistory.splice(0, 0, tab); |
| this._updateTabElements(); |
| - if (focused) |
| + if (shouldFocus) |
| this.focus(); |
| var eventData = { tabId: id, view: tab.view, isUserGesture: userGesture }; |