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

Unified Diff: Source/WebCore/inspector/front-end/TextPrompt.js

Issue 10116026: Merge 114382 - Web Inspector: Suggest box appears after the command was executed in console sometim… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/TextPrompt.js
===================================================================
--- Source/WebCore/inspector/front-end/TextPrompt.js (revision 114504)
+++ Source/WebCore/inspector/front-end/TextPrompt.js (working copy)
@@ -303,6 +303,7 @@
clearTimeout(this._completeTimeout);
delete this._completeTimeout;
}
+ delete this._waitingForCompletions;
if (!this.autoCompleteElement)
return;
@@ -378,6 +379,7 @@
}
var wordPrefixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, this._completionStopCharacters, this._element, "backward");
+ this._waitingForCompletions = true;
this._loadCompletions(this, wordPrefixRange, force, this._completionsReady.bind(this, selection, auto, wordPrefixRange, !!reverse));
},
@@ -423,10 +425,11 @@
*/
_completionsReady: function(selection, auto, originalWordPrefixRange, reverse, completions)
{
- if (!completions || !completions.length) {
+ if (!this._waitingForCompletions || !completions || !completions.length) {
this.hideSuggestBox();
return;
}
+ delete this._waitingForCompletions;
var selectionRange = selection.getRangeAt(0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698