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

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

Issue 2478563002: DevTools: Substring autocomplete in Console and StylesSideBar. (Closed)
Patch Set: tests Created 4 years, 1 month 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/SuggestBox.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/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 836cc8d0b62d4d681b81939ab53b11f5f4b5704d..edb4d88e508926af9147c95917997961db906c96 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -329,7 +329,7 @@ WebInspector.TextPrompt = class extends WebInspector.Object {
}
_refreshGhostText() {
- if (this._queryRange && this._isCaretAtEndOfPrompt()) {
+ if (this._queryRange && this._isCaretAtEndOfPrompt() && this._currentSuggestion.startsWith(this.text().substring(this._queryRange.startColumn))) {
this._ghostTextElement.textContent =
this._currentSuggestion.substring(this._queryRange.endColumn - this._queryRange.startColumn);
this._element.appendChild(this._ghostTextElement);
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698