Last modified: 2013-07-06 23:11:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37176, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35176 - jquery.makeCollapsible.js doesn't collapse collapsible elements which are inside of a hidden element
jquery.makeCollapsible.js doesn't collapse collapsible elements which are ins...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 19:57 UTC by Mark A. Hershberger
Modified: 2013-07-06 23:11 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mark A. Hershberger 2012-03-12 19:57:05 UTC
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!
Comment 1 Lupo 2012-03-14 09:17:29 UTC
Confirmed. Note that this appears to be corrected with the rewritten jquery.makeCollapsible() attached to bug 34876 as attachment 10193 [details] (with the patch in attachment 10234 [details] applied).
Comment 2 Bartosz Dziewoński 2013-07-06 19:51:05 UTC
I can no longer reproduce this using the steps provided – the table is correctly collapsed when shown with the  "Test now!" link.

The $.makeCollapsible script has been largely rewritten since the time of the report, I think.
Comment 3 Helder 2013-07-06 22:33:40 UTC
Indeed. On step 4 I get a table like this:
+----------------+
| A | B [expand] |
+----------------+

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links