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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: FocusRestorer 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/sources/NavigatorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
index 99b953db3e7d289337ae2dd297446968b48e538f..dbc5686e7f3fb558994e4f6ae5b7404bac185da1 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
@@ -978,9 +978,7 @@ WebInspector.NavigatorSourceTreeElement.prototype = {
if (!this._uiSourceCode.canRename())
return false;
var isSelected = this === this.treeOutline.selectedTreeElement;
- var document = this.treeOutline.element.ownerDocument;
- var isFocused = this.treeOutline.element.isSelfOrAncestor(document.activeElement);
- return isSelected && isFocused && !WebInspector.isBeingEdited(this.treeOutline.element);
+ return isSelected && this.treeOutline.element.hasFocus() && !WebInspector.isBeingEdited(this.treeOutline.element);
},
selectOnMouseDown: function(event)

Powered by Google App Engine
This is Rietveld 408576698