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

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

Issue 2319523004: DevTools: Remember the last focused widget. (Closed)
Patch Set: setDefaultFocusedChild Created 4 years, 3 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/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 7f1f3748b5fc8d4d38534b349f52df6ad369d243..c9f3a586c3253bc780fc52266e1b3b6d5c8dc83b 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -813,6 +813,8 @@ WebInspector.currentFocusElement = function()
WebInspector._focusChanged = function(event)
{
var node = event.deepActiveElement();
+ if (WebInspector._currentFocusElement !== node)
+ WebInspector.Widget.focusWidgetForNode(node);
WebInspector.setCurrentFocusElement(node);
}
@@ -869,6 +871,7 @@ WebInspector.setCurrentFocusElement = function(x)
selection.removeAllRanges();
selection.addRange(selectionRange);
}
+
dgozman 2016/09/12 16:50:21 stray blank line
einbinder 2016/09/12 18:18:54 Done.
} else if (WebInspector._previousFocusElement)
WebInspector._previousFocusElement.blur();
}

Powered by Google App Engine
This is Rietveld 408576698