You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2008/02/15 07:43:46 UTC

svn commit: r627961 - /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Author: matzew
Date: Thu Feb 14 22:43:45 2008
New Revision: 627961

URL: http://svn.apache.org/viewvc?rev=627961&view=rev
Log:
TRINIDAD-952

Thx to Yee-Wah for her patch!

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?rev=627961&r1=627960&r2=627961&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js Thu Feb 14 22:43:45 2008
@@ -3274,6 +3274,26 @@
 //
 function _pprStartBlocking(win)
 {
+  if (_agent.isIE)
+  {
+    // see TRINIDAD-952 - IE does not update the activeElement in time before
+    // blocking starts. Use a timeout to allow the update.
+    win._pprTimeoutFunc = win.setTimeout("_doPprStartBlocking(window);",
+                                             1);
+    return;        
+  }
+  else
+  {
+     _doPprStartBlocking (win);
+  }
+}
+
+function _doPprStartBlocking (win)
+{
+  // Clean up timeout set in _pprStartBlocking()
+  if (win._pprTimeoutFunc)
+    win.clearTimeout(win._pprTimeoutFunc);
+
   // In order to force the user to allow a PPR update to complete, we
   // block all mouse clicks between the start of a PPR update, and the end.
   // We do this by building a dummy DIV element and having it grab all clicks.
@@ -3300,7 +3320,7 @@
                                                8000);
     }
     else if (_agent.isIE)
-    {
+    {    
       // save off the element we'll return focus to
       _pprEventElement = window.document.activeElement;
     }