You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "vineet semwal (JIRA)" <ji...@apache.org> on 2012/10/20 20:38:11 UTC

[jira] [Comment Edited] (WICKET-4825) Odd Javascript behavior with 6.1.1

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

vineet semwal edited comment on WICKET-4825 at 10/20/12 6:37 PM:
-----------------------------------------------------------------

comment  target.add( wmc ) and you will see the correct behavior .what exactly went wrong is when you do ajax refresh,the css class  "expandable" of attributeappender is shown at client, your script toggles it off and toggles on "expanded", on each ajaxevent the same thing happens and hence the class "expanded" appears stuck to user or to the eyes.

not a bug.
                
      was (Author: vineetsemwal):
    comment  target.add( wmc ) and you will see the correct behavior .what exactly went wrong is when you do ajax refresh,the css class at client becomes "expandable" which your script changes to "expanded" and hence the expanded appears stuck to user or to the eyes.
                  
> Odd Javascript behavior with 6.1.1
> ----------------------------------
>
>                 Key: WICKET-4825
>                 URL: https://issues.apache.org/jira/browse/WICKET-4825
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.1
>            Reporter: Nick Pratt
>         Attachments: quickstart.tar.gz
>
>
> See attached quickstart. I expect the <div> to toggle colors between red and green on every click. This doesnt happen (latest Chrome browser). The panel only toggles color on the first click. 
> Issuing the returned javascript directly in Chrome's dev tools correctly toggles the panel colors as expected:
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expandable">​Click Me​</div>​]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expanded">​Click Me​</div>​]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expandable">​Click Me​</div>​]
> Looking really closely at the element inspector in Chrome, it looks like the panel's class attributes do get toggled but then they seem to get overwritten.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira