#29 onMouseDown javascript support

closed-fixed
None
5
2008-03-29
2004-01-25
No

The following patch enables support for the JavaScript
1.2 onMouseDown/onMouseUp events in addition to the
already existing JavaScript 1.1 onClick event.

This support is needed for testing JavaServerFaces-
generated links, which by default uses onMouseDown
instead of onClick.

Discussion

  • Björn Beskow

    Björn Beskow - 2004-01-25

    patch for onMouseDown/onMouseUp event support.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-29

    Logged In: YES
    user_id=1220573
    Originator: NO

    the patch looks pretty good - I especially like the test cases.
    Are you still working with httpunit?

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-29
    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> pending
     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-29

    Logged In: YES
    user_id=1220573
    Originator: NO

    The change is now in the subversion repository and will be in the next release.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-29
    • status: pending --> closed-fixed
     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-29

    Logged In: YES
    user_id=1220573
    Originator: NO

    very many thanks - especially for the testcases.
    That patch was a tough one since there is another Javascript engine now. I had to refraing from using the local variable and make sure
    that everything goes thru getAttribute - it now boils down to
    /**
    * get the event Handler script for the event e.g. onchange, onmousedown, onclick, onmouseup
    * execute the script if it's assigned by calling doEvent for the script
    * @param eventName
    * @return
    */
    public boolean handleEvent(String eventName) {
    // check whether onclick is activated
    if (eventName.toLowerCase().equals("onclick")) {
    handleEvent("onmousedown");
    }
    String eventScript = getAttribute( eventName );
    boolean result=doEventScript(eventScript);
    if (eventName.toLowerCase().equals("onclick")) {
    handleEvent("onmouseup");
    }
    return result;
    }

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks