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

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

Issue 2002803002: DevTools: allow focus to be restored to the drawer when dialog closes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Drawer.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
index 5d2782129c514dccfe8c2366a65ff4fa17911085..b9c01d1d4a7008eccce3153a9787a885dde9e190 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
@@ -409,7 +409,11 @@ WebInspector.InspectorView.prototype = {
*/
defaultFocusedElement: function()
{
- return this._currentPanel ? this._currentPanel.defaultFocusedElement() : null;
+ if (this._drawer.hasFocus()) {
lushnikov 2016/05/23 18:19:24 style 1: the if blocks with return statements shou
luoe 2016/05/23 19:18:41 Done.
+ return this._drawer.defaultFocusedElement();
+ } else {
+ return this._currentPanel ? this._currentPanel.defaultFocusedElement() : null;
+ }
},
_keyPress: function(event)
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Drawer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698