Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/Drawer.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Drawer.js b/third_party/WebKit/Source/devtools/front_end/ui/Drawer.js |
| index eef58564134916f11add2704ba958944fa85d628..a4185abbcbef28fd50ad7c7f9e5b0e0d553d0a7e 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Drawer.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Drawer.js |
| @@ -68,9 +68,20 @@ WebInspector.Drawer.prototype = { |
| */ |
| showView: function(id, immediate) |
| { |
| + /** |
| + * @param {?WebInspector.Widget} view |
| + * @return {?WebInspector.Widget} view |
| + * @this {WebInspector.Drawer} |
| + */ |
| + function tabViewLoaded(view) |
| + { |
| + this.focus(); |
|
dgozman
2016/05/31 19:30:42
I think you can call |this.focus()| right after |_
luoe
2016/05/31 21:22:54
This would cover most cases, but there is one case
|
| + return view; |
| + } |
| + |
| this._innerShow(immediate); |
| WebInspector.userMetrics.drawerShown(id); |
| - return this._extensibleTabbedPaneController.showTab(id); |
| + return this._extensibleTabbedPaneController.showTab(id).then(tabViewLoaded.bind(this)); |
| }, |
| showDrawer: function() |