merge m-c to fx-team

This commit is contained in:
Tim Taubert 2013-06-10 21:17:09 +02:00
commit 4d247cc8b8
2 changed files with 8 additions and 8 deletions

View File

@ -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");

View File

@ -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;