Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-878

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1.5-SNAPSHOT
    • None
    • submitOnEvent
    • None
    • WebTest R_1479, HtmlUnit 1.10, Rhino 1.6R5

    Description

      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":

              if (!event)                                                                                                                                                                 
              {                                                                                                                                                                           
                  return ret;                                                                                                                                                             
              }                                                                                                                                                                           
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            seidler Stefan Seidel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: