Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Drawer.js

Issue 2016963002: DevTools: rework focus logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stray newline Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()

Powered by Google App Engine
This is Rietveld 408576698