[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3444) s:defaultAction not work in firefox, and patch

Pete Muir (JIRA) jira-events at lists.jboss.org
Wed Apr 8 09:36:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12461218#action_12461218 ] 

Pete Muir commented on JBSEAM-3444:
-----------------------------------

Maximilliano, it's not hard to admit that I was unable to reproduce :-p. However obviously you can. As I say, onclick is an entirely different function.

Anyway, provide a working fix, and we can apply.

> s:defaultAction not work in firefox, and patch
> ----------------------------------------------
>
>                 Key: JBSEAM-3444
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3444
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.0.2.SP1
>            Reporter: liu lei
>         Attachments: DefaultActionRendererBase.java
>
>
> s:defaultAction not work in firefox.
> the problem is that firefox donnot have the "click()" event, but have the "onclick()" event.
> So i change the "click()" to "onclick()", which is supported both in ie and firefox.
> String functionBody = 
>             "{var keycode;" + 
>             "if (window.event) keycode = window.event.keyCode;" +
>             "else if (event) keycode = event.which;" +
>             "else return true;" + 
>             "if (keycode == 13) " +
>           // "{ document.getElementById('" + actionComponentId + "').click();return false; } " +  //wrong!!!!!!!!!
>             "{ document.getElementById('" + actionComponentId + "').onclick();return false; } " +   //right!!!!!!!!!!!!!
>             "else return true; }";
> I have tested in ie7 and firefox 3

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list