зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 46040. We need to dismiss the popup menu when the user press the tab key. R=mscott
Aso, I have incorporated a patch submitted by Matthew Cline (bug 42582)
This commit is contained in:
Родитель
6934379c08
Коммит
7ee2ba9ae0
|
@ -272,6 +272,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
keyNavigation: function(me, event, popup) {
|
keyNavigation: function(me, event, popup) {
|
||||||
|
if (me.lastResults == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var inputElement = document.getAnonymousNodes(me)[0].firstChild;
|
var inputElement = document.getAnonymousNodes(me)[0].firstChild;
|
||||||
if (event.keyCode == 38 || event.keyCode == 40)
|
if (event.keyCode == 38 || event.keyCode == 40)
|
||||||
{
|
{
|
||||||
|
@ -356,9 +359,15 @@
|
||||||
me.autoCompleteTimer = 0;
|
me.autoCompleteTimer = 0;
|
||||||
}
|
}
|
||||||
me.privatefunc.closePopupMenu(me);
|
me.privatefunc.closePopupMenu(me);
|
||||||
me.lastResults.searchString='';
|
if (me.lastResults != null)
|
||||||
|
me.lastResults.searchString='';
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case 9: /*vk_tab*/
|
||||||
|
if (popup)
|
||||||
|
me.privatefunc.closePopupMenu(me);
|
||||||
|
return;
|
||||||
|
|
||||||
case 13 /*vk_return*/:
|
case 13 /*vk_return*/:
|
||||||
if (me.autoCompleteTimer) {
|
if (me.autoCompleteTimer) {
|
||||||
clearTimeout(me.autoCompleteTimer);
|
clearTimeout(me.autoCompleteTimer);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче