Making the default toggle look clickable again
authorMoritz Oberhauser <moritz.oberhauser@gmail.com>
Sat, 27 May 2017 11:20:35 +0000 (13:20 +0200)
committerMoritz Oberhauser <moritz.oberhauser@gmail.com>
Sat, 27 May 2017 11:20:35 +0000 (13:20 +0200)
The toggle should now look same same prior to the premade toggle changes. The brackets are not part of the link, but the text inbetween. The link has no href property, so the toggle action is still triggered.

Bug: T166359
Change-Id: I38698cd66d380626728eae9b8a9da1e465b207a6

resources/src/jquery/jquery.makeCollapsible.js

index ac4a392..5ce9b1f 100644 (file)
 
                        // Default toggle link. Only build it when needed to avoid jQuery memory leaks (event data).
                        buildDefaultToggleLink = function () {
-                               return $( '<span class="mw-collapsible-text"></span>' )
+                               return $( '<a class="mw-collapsible-text"></a>' )
                                        .text( collapseText )
                                        .wrap( '<span class="mw-collapsible-toggle"></span>' ).parent()
                                                .attr( {