https://bugzilla.wikimedia.org/show_bug.cgi?id=35176

       Web browser: ---
             Bug #: 35176
           Summary: jquery.makeCollapsible.js doesn't collapse collapsible
                    elements which are inside of a hidden element
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Javascript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---


1) Add to [[Wikipedia:Sandbox]] the following code (e.g.:
https://en.wikipedia.org/?oldid=481562172):
<div id="foo-bar" style="display:none;">
{| class="wikitable mw-collapsible mw-collapsed"
|-
!A||B
|-
|C||D
|}
</div>

2) Add to [[Special:MyPage/common.js]] the script below (e.g.:
https://en.wikipedia.org/?oldid=481560711)
$( mw.util.addPortletLink( 'p-namespaces', '#', 'Test now!' ) ).click( function
( e ) {
   $('#foo-bar').show();
} );

3) Open the sandbox and click on "Test now!"
4) It will appear a table like this:
+----------------+
| A | B [expand] |
+----------------+
| C | D          |
+----------------+

5) Click on "[expand]" and the same table will be displayed, but now with the
"[collapse]" button:
+------------------+
| A | B [collapse] |
+------------------+
| C | D            |
+------------------+

6) Click on "[collapse]" and it will appear a collapsed table like this:
+----------------+
| A | B [expand] |
+----------------+

As you can see, although we added the class "mw-collapsed" and the button in
the table from (4) says "expand", the table is not collapsed!

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to