Last modified: 2014-02-01 11:19:43 UTC
Until sometime ago I was able to copy the text of a collapsible section header such as this: https://en.wikipedia.org/wiki/WP:Sandbox?oldid=592466923 It seems this broke when Gerrit change #105689 was merged. Tested both on Google Chrome and Firefox.
This was done because of bug 34445 From bug 34445 comment #0 : > The hide/show buttons should also be not selectable. INVALID?
Buttons are part of the user interface and should not contain content.
The ability to create a custom toggle with arbitrary text is a documented feature of the plugin: http://translatewiki.net/w/i.php?title=Sandbox&diff=2692006 https://meta.wikimedia.org/wiki/User_talk:Krinkle?oldid=7067994#Collapsible_templates https://www.mediawiki.org/wiki/ResourceLoader/Default_modules#jquery.makeCollapsible https://en.wikibooks.org/w/index.php?diff=prev&oldid=2060844 See also bug 34445 comment 9.
The function of a button is not copyable. The text of the button without the function is useless. The possibility to create toggle buttons with custom text is good. But this text should not contain content of the page. It should contain hints to the reader to explain the button. For example all custom toggle buttons in https://test.wikipedia.org/wiki/User:Krinkle/CollapsingTestpageMw uses only hints for the reader and do not transfer content.
Helder, does this have any real-life use-cases?
(In reply to comment #5) > Helder, does this have any real-life use-cases? Well, I noticed this because I use a script[1] to make talk page sections collapsed if they were not edited recently, having their title as a collapsible toggle, and suddenly I was not able to copy (parts of) the section titles anymore. [1] https://pt.wikibooks.org/wiki/User:Helder.wiki/Tools/TalkPageTools.js
In a script you can overwrite the setting by .mw-collapsible-toggle { -moz-user-select: all; -webkit-user-select: all; -ms-user-select: all; user-select: all; }
Created attachment 14407 [details] Screencast of Teahouse Here is another example from Teahouse: https://en.wikipedia.org/wiki/WP:Village_pump_(technical)?oldid=592927635#Unable_to_copy_at_the_Teahouse
(In reply to comment #8) > Created attachment 14407 [details] > Screencast of Teahouse > > Here is another example from Teahouse: > https://en.wikipedia.org/wiki/WP: > Village_pump_(technical)?oldid=592927635#Unable_to_copy_at_the_Teahouse I can not reproduce the problem. The screencast seam to be a z-index problem. I can not find any relations to Gerrit change #105689 .
Hmm.. Never mind, I thought the sidebar toggle was also using the collapsible plugin...
Hmm, doing something like making a title of a section a toggler for its content seems reasonable to me… We should consider reverting the patch entirely or limiting the non-selectability to default toggle links (or default and premade, but not custom), but I have no strong opinion either way. Thoughts?
(In reply to comment #11) > Hmm, doing something like making a title of a section a toggler for its > content > seems reasonable to me… > > We should consider reverting the patch entirely or limiting the > non-selectability to default toggle links (or default and premade, but not > custom), but I have no strong opinion either way. Thoughts? If the original patch only uses CSS to prevent it's selection, one can add CSS to override it and allow the selection again on the custom toggle element, or use a CSS class with the same effect. Maybe such CSS selector can be added to core, like "mw-collapsible-toggle-enable-selection" or something