You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gc...@apache.org on 2012/07/20 20:31:10 UTC

svn commit: r1363891 - /myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Author: gcrawford
Date: Fri Jul 20 18:31:10 2012
New Revision: 1363891

URL: http://svn.apache.org/viewvc?rev=1363891&view=rev
Log:
TRINIDAD-2289 function _pprControlCapture() causes an error in IE8 when it tries to focus on a PPR'd element 

Thanks to Kentaro

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

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?rev=1363891&r1=1363890&r2=1363891&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js Fri Jul 20 18:31:10 2012
@@ -3717,7 +3717,18 @@ function _pprControlCapture(win, set)
 
         // return focus to the post-PPR target element
         if (win._pprEventElement)
-          win._pprEventElement.focus();
+        {
+          // focus() should be in a try/catch block because if the element
+          // was PPR'd then IE8 will throw an error
+          try
+          {
+            win._pprEventElement.focus();
+          }
+          catch(e) 
+          {
+            // do nothing
+          }
+        }
         body.style.cursor = win._pprSavedCursor;
         win._pprSavedCursor = null;
         win._pprSavedCursorFlag = false;