[ 
https://issues.apache.org/jira/browse/WICKET-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610911#action_12610911
 ] 

Gwyn Evans commented on WICKET-1535:
------------------------------------

Yes, but nothing definative - just some other reports of the same thing, I 
think.  

It's not  major, as a workaround is to move the button outside a form, but it 
seems to me that in this usage, adding the "return false" and thus disabling 
the default action of the element /is/ the correct action.  Unfortunately, I 
was too busy to follow up on this (as I found it during system testing), but I 
don't believe that it changes the behaviour of pre-FF3 browsers, just FF3.

> ExternalLink JavaScript not working in FF 3
> -------------------------------------------
>
>                 Key: WICKET-1535
>                 URL: https://issues.apache.org/jira/browse/WICKET-1535
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>         Environment: WinXP; Firefox 3.0 Beta 5
>            Reporter: Gwyn Evans
>            Priority: Minor
>             Fix For: 1.4-M4
>
>
> If the link target isn't a proper anchor, the code generates a JS on-click 
> handler, i.e. 
>    tag.put("onclick", "window.location.href='" + url + "';");
> which generates code such as 
>   onclick='window.location.href="http://news.bbc.co.uk";;'
> The problem is that when this is used with a button /in a form/, while this 
> works with IE & FF2, it appears that FF3 needs a 'return false;' at the end 
> of the JS before it works, otherwise it just treats the button as a 'submit' 
> action.
> So, is there any down-side to changing the above line in 
>   \org\apache\wicket\markup\html\link\ExternalLink.java
> to be 
>   tag.put("onclick", "window.location.href='" + url + "'; return false;"); ?
> /Gwyn

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

Reply via email to