We have discovered that the default "span" mode of Twisty produces vastly different behaviour in different Browsers.
For example
- Twisties appear to nest when they are not coded as nested (Firefox)
- Twisties do not hide/show content when clicked (Safari)
The nesting effect occurs when an ENDTWISTY is indented, e.g.
%TWISTY{id="twist1" link="Twisty 1"
showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%"}%
* a
* b
* c
* d
%ENDTWISTY%
Setting the ENDTWISTY flush left stops the "nesting".
Both the nesting and the "can't click" problem are solved by using mode="div"
.
Neither problem occurred before we upgraded to 4.2.4
Sample code
From
TWiki:Sandbox/TwistyIssues
.
- In Safari, clicking "Click me 1" and "Click me 2" should produce expected "twisty" results. Clicking "Click me 3", "Click me 4", "Click me 5" produce no observable effect.
- In Firefox, you should see one Twisty with link test "Click me 1". Clicking that will disclose "Click me 2".
In reality there are 5 unrelated, unnested, syntactically correct twisties.
Section A
Section B
Section C
--
TWiki:Main/VickiBrown
- 07 Apr 2009
This may be related to a problem I see under Firefox 6.0.2 and reported on the
TWiki:Plugins.TwistyPluginDev
topic. In all five of the above examples, I see the Twisty content always - makes no difference if I click on the Twisty link or not. The error I was going to report as a separate bug was that, for me, a blank line in the twisty content always terminated that content. So, for example:
This is one line of the content, and
this should have been the next non-blank line in the content.
--
TWiki:Main.SteveWampler
- 2011-09-28
The
TwistyContrib and
TwistyPlugin use a
span
tag by default. According to HTML rules, a span tag is automatically ended if you end a paragraph (e.g. empty line), introduce a list or table. So, unless you want the twisty inlined within one paragraph use the default
span
tag mode, else use the
div
tag mode with parameter
mode="div"
. I fixed above example.
I set this bug item to "no action required". If you feel the default should be changed you can submit a feature request.
--
TWiki:Main.PeterThoeny
- 2011-12-14
I filed feature proposal
TWiki:Codev.NewAutoModeForTwisty
that should avoid the "gotcha" reported here.
--
TWiki:Main.PeterThoeny
- 2011-12-14