mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
fix for bug #28520;tabbing between mail panels;r=putterman
This commit is contained in:
parent
fe633c6d96
commit
91fd177d03
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();" >
|
||||
|
Loading…
Reference in New Issue
Block a user