The text of custom toggles is no longer copiable
OpenPublic

Description

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.


Version: 1.23.0
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=34445

bzimport added a project: MediaWiki-Interface.Via ConduitNov 22 2014, 3:03 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz60441.
He7d3r created this task.Via LegacyJan 26 2014, 12:13 PM
Ciencia_Al_Poder added a comment.Via ConduitJan 26 2014, 12:20 PM

This was done because of bug 34445

From bug 34445 comment #0 :

The hide/show buttons should also be not selectable.

INVALID?

Fomafix added a comment.Via ConduitJan 26 2014, 12:43 PM

Buttons are part of the user interface and should not contain content.

Fomafix added a comment.Via ConduitJan 26 2014, 1:25 PM

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.

matmarex added a comment.Via ConduitJan 27 2014, 7:03 PM

Helder, does this have any real-life use-cases?

He7d3r added a comment.EditedVia ConduitJan 27 2014, 7:52 PM

(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://github.com/he7d3r/mw-gadget-TalkPageTools

Fomafix added a comment.Via ConduitJan 29 2014, 8:49 AM

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;
}

He7d3r added a comment.Via ConduitJan 29 2014, 9:50 AM

Created attachment 14407
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

Attached:

Fomafix added a comment.Via ConduitJan 29 2014, 11:57 AM

(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 .

Attached:

He7d3r added a comment.Via ConduitJan 29 2014, 12:06 PM

Hmm.. Never mind, I thought the sidebar toggle was also using the collapsible plugin...

matmarex added a comment.Via ConduitFeb 1 2014, 2:51 AM

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?

Ciencia_Al_Poder added a comment.Via ConduitFeb 1 2014, 11:19 AM

(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

Aklapper added a project: Regression.Via WebDec 5 2014, 2:52 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.