incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Frederickx (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JSPWIKI-697) %collapse% does not collapse in Google Chrome browser 13.0.782
Date Sat, 25 Jun 2011 09:04:47 GMT

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

Dirk Frederickx commented on JSPWIKI-697:
-----------------------------------------

Something is going wrong in the function clickBullet() (only) in Chrome.
Normally clickBullet should receive 3 parameters.
But in chrome it receives an array with those 3 parameters.

You can try following fix:

Original code
> clickBullet: function( ck, bulletidx, bodyfx){
> var collapse = this.hasClass('collapseOpen'),
> bodyHeight = bodyfx.element.scrollHeight;
>
> if(collapse) bodyfx.start(bodyHeight, 0); else bodyfx.start(bodyHeight);
>
> ck.value = ck.value.substring(0,bulletidx) + (collapse ? 'c' : 'o')
> + ck.value.substring(bulletidx+1) ;
> if(ck.name) Cookie.set(ck.name, ck.value, {path:Wiki.BasePath, duration:20});
> },

Corrected code
> clickBullet: function( ck, bulletidx, bodyfx){
>
> //protective GOOGLE CHROME fix
> if($type(ck) == 'array'){ > bulletidx = ck[1]; > bodyfx = ck[2]; > ck = ck[0];
> }
>
> var collapse = this.hasClass('collapseOpen'),
> bodyHeight = bodyfx.element.scrollHeight;
>
> if(collapse) bodyfx.start(bodyHeight, 0); else bodyfx.start(bodyHeight);
>
> ck.value = ck.value.substring(0,bulletidx) + (collapse ? 'c' : 'o')
> + ck.value.substring(bulletidx+1) ;
> if(ck.name) Cookie.set(ck.name, ck.value, {path:Wiki.BasePath, duration:20});
> },

If you are changing the compressed JS code, you probably need something like this:

//protective GOOGLE CHROME fix
if($type(ck) == 'array'){ _ec = ck[1]; _ed = ck[2]; ck = ck[0]; }

I need to check in which version of JSPWiki this is already resolved. So for the time, leave
this issue open.

dirk

> %collapse% does not collapse in Google Chrome browser 13.0.782
> --------------------------------------------------------------
>
>                 Key: JSPWIKI-697
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-697
>             Project: JSPWiki
>          Issue Type: Bug
>    Affects Versions: 2.8.2
>         Environment: Win XP SP3.  Chrome 13.0.782 browser.
>            Reporter: Karl Hansen
>            Assignee: Dirk Frederickx
>            Priority: Minor
>
> When clicking on a "+" to open a collapse section in Chrome, it does not open.  This
works on Windows and Firefox.  I can hear you now:  "upgrade to 2.8.4"!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message