112577 - message pane doesn't show focus ring, patch by neil@parkwaycc.co.uk, r=hyatt, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@110791 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -716,35 +716,18 @@ function FocusRingUpdate_Mail()
|
||||
var currentFocusedElement = WhichPaneHasFocus();
|
||||
if (!currentFocusedElement)
|
||||
return;
|
||||
|
||||
|
||||
if (currentFocusedElement != gLastFocusedElement) {
|
||||
if( currentFocusedElement == GetThreadOutliner()) {
|
||||
// XXX fix me
|
||||
GetThreadOutliner().setAttribute("focusring","true");
|
||||
GetMessagePane().setAttribute("focusring","false");
|
||||
}
|
||||
currentFocusedElement.setAttribute("focusring", "true");
|
||||
|
||||
if (gLastFocusedElement)
|
||||
gLastFocusedElement.removeAttribute("focusring");
|
||||
|
||||
else if(currentFocusedElement==GetFolderOutliner()) {
|
||||
// XXX fix me
|
||||
GetThreadOutliner().setAttribute("focusring","false");
|
||||
GetMessagePane().setAttribute("focusring","false");
|
||||
}
|
||||
else if(currentFocusedElement==GetMessagePane()){
|
||||
// mscott --> fix me!!
|
||||
GetThreadOutliner().setAttribute("focusring","false");
|
||||
GetMessagePane().setAttribute("focusring","true");
|
||||
}
|
||||
else {
|
||||
// XXX fix me
|
||||
GetThreadOutliner().setAttribute("focusring","false");
|
||||
GetMessagePane().setAttribute("focusring","false");
|
||||
}
|
||||
|
||||
gLastFocusedElement = currentFocusedElement;
|
||||
gLastFocusedElement = currentFocusedElement;
|
||||
|
||||
// since we just changed the pane with focus we need to update the toolbar to reflect this
|
||||
UpdateMailToolbar("focus");
|
||||
}
|
||||
// since we just changed the pane with focus we need to update the toolbar to reflect this
|
||||
UpdateMailToolbar("focus");
|
||||
}
|
||||
}
|
||||
|
||||
function MessagePaneHasFocus()
|
||||
@@ -788,18 +771,18 @@ function IsSubWindowOf(search, wind)
|
||||
|
||||
function WhichPaneHasFocus()
|
||||
{
|
||||
var currentNode = top.document.commandDispatcher.focusedElement;
|
||||
if (!currentNode)
|
||||
return null;
|
||||
|
||||
var threadOutliner = GetThreadOutliner();
|
||||
var searchInput = GetSearchInput();
|
||||
var folderOutliner = GetFolderOutliner();
|
||||
var messagePane = GetMessagePane();
|
||||
|
||||
if (top.document.commandDispatcher.focusedWindow == GetMessagePaneFrame())
|
||||
return GetMessagePane();
|
||||
|
||||
var currentNode = top.document.commandDispatcher.focusedElement;
|
||||
while (currentNode) {
|
||||
if (currentNode === threadOutliner ||
|
||||
currentNode === folderOutliner ||
|
||||
currentNode === messagePane)
|
||||
currentNode === searchInput ||
|
||||
currentNode === folderOutliner)
|
||||
return currentNode;
|
||||
|
||||
currentNode = currentNode.parentNode;
|
||||
|
||||
@@ -735,6 +735,14 @@ function GetFolderOutliner()
|
||||
return gFolderOutliner;
|
||||
}
|
||||
|
||||
function GetSearchInput()
|
||||
{
|
||||
if (gSearchInput) return gSearchInput;
|
||||
gSearchInput = document.getElementById("searchInput");
|
||||
return gSearchInput;
|
||||
}
|
||||
|
||||
|
||||
function GetMessagePane()
|
||||
{
|
||||
if (gMessagePane) return gMessagePane;
|
||||
|
||||
Reference in New Issue
Block a user