зеркало из https://github.com/mozilla/gecko-dev.git
merge m-c to fx-team
This commit is contained in:
Коммит
4e2ce6dbad
|
@ -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");
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче