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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.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/ui/TextPrompt.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
index 2701d7c6358e2a4a5ea1780ea049095d8881a8d0..0532a9d755c0e16ddb3dbd5394821c13bbe770b6 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -153,7 +153,7 @@ WebInspector.TextPrompt.prototype = {
this._proxyElement.remove();
delete this._proxyElement;
this._element.classList.remove("text-prompt");
- WebInspector.restoreFocusFromElement(this._element);
+ this._focusRestorer.restore();
},
/**
@@ -241,7 +241,7 @@ WebInspector.TextPrompt.prototype = {
this._oldTabIndex = this._element.tabIndex;
if (this._element.tabIndex < 0)
this._element.tabIndex = 0;
- WebInspector.setCurrentFocusElement(this._element);
+ this._focusRestorer = new WebInspector.ElementFocusRestorer(this._element);
if (!this.text())
this._updateAutoComplete();
},

Powered by Google App Engine
This is Rietveld 408576698