diff --git a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js index 6d53ca35275e..56a3eb7dfb28 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js @@ -194,8 +194,12 @@ function testReturnKey() ok(!popup.isOpen, "popup is not open after VK_RETURN"); - is(inputNode.value, "window.foobarBug585991.valueOf", - "completion was successful after VK_RETURN"); + // modified by bug 873250 + is(inputNode.value, "", "no completion after VK_RETURN"); + isnot(jsterm.lastInputValue, "window.foobarBug585991.valueOf", + "lastInputValue is not window.foobarBug585991.valueOf"); + EventUtils.synthesizeKey("VK_UP", {}); + is(inputNode.value, jsterm.lastInputValue, "previous entry was lastInputNode") ok(!completeNode.value, "completeNode is empty"); diff --git a/browser/devtools/webconsole/webconsole.js b/browser/devtools/webconsole/webconsole.js index a1fc1923ff66..291d8531d166 100644 --- a/browser/devtools/webconsole/webconsole.js +++ b/browser/devtools/webconsole/webconsole.js @@ -3949,13 +3949,9 @@ JSTerm.prototype = { } break; + // Bug 873250 - always enter, ignore autocomplete case Ci.nsIDOMKeyEvent.DOM_VK_RETURN: - if (this.autocompletePopup.isOpen && this.autocompletePopup.selectedIndex > -1) { - this.acceptProposedCompletion(); - } - else { - this.execute(); - } + this.execute(); aEvent.preventDefault(); break;