Bug 251513. Content of tabs not focused to keyboard scrolling when switching tabs. r=mconner, no sr= needed

This commit is contained in:
aaronleventhal%moonset.net 2004-07-19 15:53:02 +00:00
Родитель 6b7dd74605
Коммит a94a11bfab
2 изменённых файлов: 4 добавлений и 8 удалений

Просмотреть файл

@ -347,7 +347,7 @@
var cancel = false;
const IController = Components.interfaces.nsIAutoCompleteController;
if (!this.disableKeyNavigation) {
if (!this.disableKeyNavigation && !aEvent.ctrlKey && !aEvent.altKey) {
switch (aEvent.keyCode) {
case KeyEvent.DOM_VK_TAB:
if (this.tabScrolling && this.popup.mPopupOpen)

Просмотреть файл

@ -51,7 +51,7 @@
<content>
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
<xul:tabbox flex="1" xbl:inherits="handleCtrlPageUpDown"
<xul:tabbox flex="1" xbl:inherits="handleCtrlPageUpDown" eventnode="document"
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
<xul:hbox class="tabbrowser-strip chromeclass-toolbar" collapsed="true" tooltip="_child" context="_child">
<xul:tooltip onpopupshowing="event.preventBubble(); if (document.tooltipNode.hasAttribute('label')) { this.setAttribute('label', document.tooltipNode.getAttribute('label')); return true; } return false;"/>
@ -493,12 +493,7 @@
}
function setFocus(element) {
if (document.commandDispatcher.focusedElement &&
document.commandDispatcher.focusedElement.parentNode ==
this.mCurrentTab.parentNode) {
// The focus is on a tab in the same tab panel
return; // If focus was on a tab, switching tabs focuses the new tab
}
Components.lookupMethod(element, "focus").call(element);
}
var whatToFocus = window.content;
@ -1355,6 +1350,7 @@
<![CDATA[
this.mCurrentBrowser = this.mPanelContainer.firstChild;
this.mCurrentTab = this.mTabContainer.firstChild;
this.mTabBox.handleCtrlTab = !/Mac/.test(navigator.platform);
]]>
</constructor>