* eMail: handle Focus Issues (browser pops in front when in background on mail list refresh)

> make use of document.hidden or document.msHidden or document.webkitHidden; if browsers do not support these use old behavior
This commit is contained in:
Klaus Leithoff 2013-04-24 12:15:10 +00:00
parent 15c251ba73
commit 4579b7dd79

View File

@ -682,9 +682,18 @@ function quickSearch() {
}
function isHiddenSupported(){
return typeof (document.hidden || document.msHidden || document.webkitHidden) != "undefined";
}
function isPageHidden(){
return document.hidden || document.msHidden || document.webkitHidden;
}
function mail_focusGridElement(_uid)
{
//alert('mail_focusGridElement'+_uid);
if (isHiddenSupported() && isPageHidden()) return;
var allElements = mailGrid.dataRoot.actionObject.flatList();
if (allElements.length>0)
{
@ -725,6 +734,7 @@ var fm_previewMessageID = null;
function selectedGridChange(_selectAll) {
// Get the currently focused object
if (isHiddenSupported() && isPageHidden()) return;
if (mailGrid)
{
var focused = mailGrid.dataRoot.actionObject.getFocusedObject();