You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Stefan Seidel (JIRA)" <de...@myfaces.apache.org> on 2007/01/31 18:30:05 UTC

[jira] Created: (TOMAHAWK-878) orgApacheMyfacesSubmitOnEventSetEvent: event is checked for null but window.event is not

orgApacheMyfacesSubmitOnEventSetEvent: event is checked for null but window.event is not
----------------------------------------------------------------------------------------

                 Key: TOMAHAWK-878
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-878
             Project: MyFaces Tomahawk
          Issue Type: Improvement
          Components: submitOnEvent
    Affects Versions: 1.1.5-SNAPSHOT
         Environment: WebTest R_1479, HtmlUnit 1.10, Rhino 1.6R5
            Reporter: Stefan Seidel
            Priority: Minor


When using the submitOnEvent in a Canoo WebTest/HtmlUnit Test/with Rhino, it may happen that orgApacheMyfacesSubmitOnEventSetEvent is called with event==null ((!event) evaluates to true). It is then set to window.event, but this is null, also. In this case, JavaScript execution will fail because the cancelBubble property is being tried to be set to true (line 182), but event is null.
Solution is to insert these 4 lines just before "event.cancelBubble = true":
{code}
        if (!event)                                                                                                                                                                 
        {                                                                                                                                                                           
            return ret;                                                                                                                                                             
        }                                                                                                                                                                           
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.