Page MenuHomePhabricator

The text of makeCollapsible custom toggles should be copiable
Closed, DeclinedPublic

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 rMWe1159798bd1543f819b45d23e2f4632f85f017b2 was merged.

Tested both on Google Chrome and Firefox.


See Also: T36445: user-select:none for editsection buttons and other buttons

Details

Reference
bz60441

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:03 AM
bzimport set Reference to bz60441.
bzimport added a subscriber: Unknown Object (MLST).

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?

(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

Krinkle renamed this task from The text of custom toggles is no longer copiable to The text of makeCollapsible custom toggles should be copiable.May 24 2016, 12:02 AM
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.
Jdlrobson subscribed.

Given the age of this bug and the fact gadgets / site scripts can change the default "user-select" CSS property to override this behave, I am going to decline this bug.