Title: [99432] trunk/Source/WebCore
- Revision
- 99432
- Author
- [email protected]
- Date
- 2011-11-07 09:36:23 -0800 (Mon, 07 Nov 2011)
Log Message
Web Inspector: Suggest box should consume enter key pressed event.
https://bugs.webkit.org/show_bug.cgi?id=71700
Reviewed by Pavel Feldman.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99431 => 99432)
--- trunk/Source/WebCore/ChangeLog 2011-11-07 17:16:18 UTC (rev 99431)
+++ trunk/Source/WebCore/ChangeLog 2011-11-07 17:36:23 UTC (rev 99432)
@@ -1,3 +1,16 @@
+2011-11-07 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Suggest box should consume enter key pressed event.
+ https://bugs.webkit.org/show_bug.cgi?id=71700
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView):
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype._attachInternal):
+ (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
+
2011-11-07 Dominic Cooney <[email protected]>
Remove initPageTransitionEvent method
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (99431 => 99432)
--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-11-07 17:16:18 UTC (rev 99431)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-11-07 17:36:23 UTC (rev 99432)
@@ -61,7 +61,6 @@
this.promptElement.id = "console-prompt";
this.promptElement.className = "source-code";
this.promptElement.spellcheck = false;
- this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
this.messagesElement.appendChild(this.promptElement);
this.messagesElement.appendChild(document.createElement("br"));
@@ -114,6 +113,7 @@
this.prompt = new WebInspector.TextPromptWithHistory(this.completions.bind(this), ExpressionStopCharacters + ".");
this.prompt.setSuggestBoxEnabled("generic-suggest");
this.prompt.attach(this.promptElement);
+ this.prompt.proxyElement.addEventListener("keydown", this._promptKeyDown.bind(this), false);
this.prompt.setHistoryData(WebInspector.settings.consoleHistory.get());
}
Modified: trunk/Source/WebCore/inspector/front-end/TextPrompt.js (99431 => 99432)
--- trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2011-11-07 17:16:18 UTC (rev 99431)
+++ trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2011-11-07 17:36:23 UTC (rev 99432)
@@ -105,7 +105,7 @@
element.parentElement.insertBefore(this.proxyElement, element);
this.proxyElement.appendChild(element);
this._element.addStyleClass("text-prompt");
- this._element.addEventListener("keydown", this._boundOnKeyDown, true);
+ this._element.addEventListener("keydown", this._boundOnKeyDown, false);
this._element.addEventListener("selectstart", this._selectStart.bind(this), false);
if (typeof this._suggestBoxClassName === "string")
@@ -1078,7 +1078,8 @@
enterKeyPressed: function(event)
{
- return this.acceptSuggestion();
+ this.acceptSuggestion();
+ return true;
},
tabKeyPressed: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes