The text of custom toggles is no longer copiable
Open, LowPublic

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

Details

Reference
bz60441
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz60441.
He7d3r created this task.Jan 26 2014, 12:13 PM

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 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?

He7d3r added a comment.EditedJan 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

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
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:

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

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

Add Comment