зеркало из https://github.com/mozilla/gecko-dev.git
this event handler doesn't need to return a value
This commit is contained in:
Родитель
56103cc0a9
Коммит
616f022d79
|
@ -462,20 +462,20 @@ function ctrlNumberTabSelection(event)
|
||||||
if (event.altKey && event.keyCode == KeyEvent.DOM_VK_RETURN) {
|
if (event.altKey && event.keyCode == KeyEvent.DOM_VK_RETURN) {
|
||||||
// Don't let winxp beep on ALT+ENTER, since the URL bar uses it.
|
// Don't let winxp beep on ALT+ENTER, since the URL bar uses it.
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!event.ctrlKey)
|
if (!event.ctrlKey)
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
var index = event.charCode - 49;
|
var index = event.charCode - 49;
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
index = 9;
|
index = 9;
|
||||||
if (index < 0 || index > 9)
|
if (index < 0 || index > 9)
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
if (index >= gBrowser.mTabContainer.childNodes.length)
|
if (index >= gBrowser.mTabContainer.childNodes.length)
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
var oldTab = gBrowser.selectedTab;
|
var oldTab = gBrowser.selectedTab;
|
||||||
var newTab = gBrowser.mTabContainer.childNodes[index];
|
var newTab = gBrowser.mTabContainer.childNodes[index];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче