fix for bug #28520;tabbing between mail panels;r=putterman

This commit is contained in:
varada%netscape.com 2000-09-06 20:50:36 +00:00
parent fe633c6d96
commit 91fd177d03
2 changed files with 76 additions and 2 deletions

View File

@ -606,7 +606,7 @@ function CommandUpdate_UndoRedo()
EnableMenuItem("menu_redo", SetupUndoRedoCommand("cmd_redo"));
}
/*function MessagePaneHasFocus()
function MessagePaneHasFocus()
{
var focusedWindow = top.document.commandDispatcher.focusedWindow;
var messagePaneWindow = top.frames['messagepane'];
@ -633,7 +633,7 @@ function IsSubWindowOf(search, wind, found)
return true;
}
return false;
}*/
}
function SetupCommandUpdateHandlers()
@ -864,3 +864,74 @@ function SetTemplateTreeItemOpen(open)
}
}
function SwitchPaneFocus(event)
{
if (event && (event.shiftKey))
{
dump("Inside the SwitchPaneFocus \n");
var focusedElement = document.commandDispatcher.focusedElement;
var focusedElementId="";
if ( MessagePaneHasFocus() )
SetFocusThreadPane();
else
{
try
{
focusedElementId = focusedElement.getAttribute('id');
if(focusedElementId == "threadTree")
SetFocusFolderPane();
else if(focusedElementId == "folderTree")
SetFocusMessagePane();
}
catch(e)
{
SetFocusMessagePane();
}
}
}
else
{
dump("Inside the SwitchPaneFocus \n");
var focusedElement = document.commandDispatcher.focusedElement;
var focusedElementId="";
if ( MessagePaneHasFocus() )
SetFocusFolderPane();
else
{
try
{
focusedElementId = focusedElement.getAttribute('id');
if(focusedElementId == "threadTree")
SetFocusMessagePane();
else if(focusedElementId == "folderTree")
SetFocusThreadPane();
}
catch(e)
{
SetFocusMessagePane();
}
}
}
}
function SetFocusFolderPane()
{
document.getElementById("folderTree").focus();
return;
}
function SetFocusThreadPane()
{
document.getElementById("threadTree").focus();
return;
}
function SetFocusMessagePane()
{
top.frames['messagepane'].focus();
return;
}

View File

@ -147,6 +147,9 @@ Rights Reserved.
<key id="key_find" key="&findCmd.key;" xulkey="true" shift="false" observes="cmd_find"/>
<key id="key_findAgain" key="&findAgainCmd.key;" xulkey="true" shift="false" observes="cmd_findAgain"/>
<!-- Tab Keys -->
<key id="tabpane" keycode="VK_TAB" onkeypress="SwitchPaneFocus(event)" />
</keyset>
<popup id="threadPaneContext" oncreate="return fillThreadPaneContextMenu();" >