jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis.Mast...@log-net.com
Subject Re: Google Chrome and CollapseBox
Date Wed, 30 Mar 2011 14:33:38 GMT
Terry:

This worked!  Thanks.

For reference, the obfuscated code is:

if($type(B) == 'array'){C = B[1];A = B[2];B = B[0];}

-Lou

Terry Steichen <terry@net-frame.com> wrote on 03/30/2011 09:32:48 AM:

> Lous,
> 
> Here's the fix I used with Dirk's excellent help.
> 
> Terry
> 
> Dirk,
> 
> Many thanks - that did the trick.  Had to change a couple of 
> variable names, but that was it.  Here's the final insert that I added:
> //protective GOOGLE CHROME fix
> if($type(ck) == 'array'){
>     _ec = ck[1];
>     _ed = ck[2];
>     ck = ck[0];
> }

> Regards,
> 
> Terry
> 
> 
> On Fri, 2011-02-11 at 21:33 +0100, Dirk Frederickx wrote: 
> 
> Hi Terry,
> 
> I noticed that something is going wrong in the function 
> clickBullet() in Chrome.
> 
> Normally clickBullet should receive 3 parameters.
> But in chrome it receives an array with those 3 parameters.
> 
> 
> Can you 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});
>    },
> 
> 
> 
> I couldn't investigate why chrome's behaviour is different from the
> other browsers.
> Let me know if this work.
> 
> 
> 
> 
> dirk
> 

> 
> 
> 
> 
> 
> On Wed, 2011-03-30 at 07:42 -0400, Louis.Masters@log-net.com wrote: 
> 
> I know this is a little late, but I just confirmed this behavior with 
FF4 
> and 2.8.1.  You get the following error:
> 
> Error: A is undefined
> Source File: http://wiki.log-net.com/LNWiki/scripts/jspwiki-common.js
> Line: 1
> 
> I checked the jspwiki.org site and it looks like this is fixed (running 
> 2.8.4).  I'm a little strapped for time and can't upgrade to 2.8.4 right 

> now - does anyone know if this was a quick fix that I can implement in 
> 2.8.1?
> 
> -Lou
> 
> 
> Bob Paige <bobpaige@gmail.com> wrote on 10/29/2010 10:46:18 AM:
> 
> > Recently I noticed that the collapseboxes on my wiki pages no longer 
> work in
> > Chrome. I am using JSPWiki 2.6.3 (yes, I know it is old) and Chrome
> > 7.0.517.41 (automatically updated 19-Oct).
> > 
> > In the past I've had a problem with Chrome and cookies, where deleting
> > cookies fixed it, but not this time.
> > 
> > 1. Is anyone else seeing this?
> > 
> > 2. Is this an interaction between Chrome and the JSPWiki2.6.3 way of
> > handling collapsebox?
> > 
> > 3. Is this the only strong reason for upgrading my installation (and 
> custom
> > plugins, etc.) to 2.8.x?
> > 
> > Thanks.
> > 
> > -- 
> > Bobman

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message