You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2008/04/01 17:44:42 UTC
svn commit: r643456 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js
Author: imario
Date: Tue Apr 1 08:44:40 2008
New Revision: 643456
URL: http://svn.apache.org/viewvc?rev=643456&view=rev
Log:
VERY nasty bug where IE wasn't able to finish its event in case of "onchange" due to wrongly "return false" - this will lead to totally screw up that browser!
fixed duplicate even attaching in case of ppr
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js?rev=643456&r1=643455&r2=643456&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/submitOnEvent/resource/submitOnEvent.js Tue Apr 1 08:44:40 2008
@@ -98,9 +98,9 @@
}
else
{
- handler=function(event)
+ handler=function()
{
- return orgApacheMyfacesSubmitOnEventSetEvent(event, orgApacheMyfacesSubmitOnEventGeneral(clickComponentId));
+ orgApacheMyfacesSubmitOnEventGeneral(clickComponentId);
};
}
@@ -142,7 +142,20 @@
function orgApacheMyfacesSubmitOnEventAttachEvent(component, components, eventType, handler, userHandler)
{
- var setupHandler;
+ if (!component.oamSOEAttachedHandlers)
+ {
+ component.oamSOEAttachedHandlers=new Object;
+ }
+ if (component.oamSOEAttachedHandlers[eventType])
+ {
+ // handler already attached
+ // do not attach again (which might happen during ppr) as then the event fires twice,
+ // or the browser is crazy afterwards at all
+ return;
+ }
+ component.oamSOEAttachedHandlers[eventType] = true;
+
+ var setupHandler;
if (document.all && eventType == "change" && !userHandler && component.type && component.type.toLowerCase() == "radio")
{