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

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

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: fixes 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 a7debf6cf6401a1544d4b7c378cdc20e9305f2a5..1f96cfa257e1bcfd61bdd25c657e792342ebe317 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
@@ -979,9 +979,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