Page MenuHomePhabricator

[edit] section links in printable version interfere with cut-and-paste of article text
Closed, ResolvedPublic


Author: mburnham

When copying headers from the printable version and pasting into another application, "[edit]" appears.

Here is a paste from the main page from the printable version.



  • The Thai Wikipedia has 30,000 registered users.

[edit] August 2007


  • The Turkish Wikipedia has reached 90,000 articles.
  • The Estonian Wikipedia has reached 40,000 articles.
  • The Bosnian Wikipedia has reached 20,000 articles.


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:51 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz11213.

ayg wrote:

This is an upstream issue. Browsers should not include display:none elements in copy-and-pasted text if they intend to maintain fidelity with what the user sees. Please complain to the maintainers of the browser you're using. As for us, we aren't going to bend over backwards (and it would be a pretty big change) to support the marginal case of copying text in a broken browser: the links are removed from the version as printed, which is the sole point of the printable version.

Edit links should not be present at all if such user's preference set. Hiding via CSS is just workaround which works only in visual browsers with CSS support and having it turned on.

  • Bug 17810 has been marked as a duplicate of this bug. ***

While we fancy devs tend to think of this as a silly complaint, it is one that hits real people doing perfectly reasonable things, and it's rather annoying to have to run about manually removing the links.

It is IMO not unreasonable to try to accommodate this... If we're not willing to change the parser output for printable mode (parser cache issues), it would at least be fairly trivial to drop in some JavaScript in wikibits.js which would trim them out, and would help the majority of people encountering this issue.

This seems like a fun one for the usability crew... Arash, take a peek! :D

kevinjduke wrote:

Thank you brion! If you get this done, you'll have my personal gratitude.

aboostani wrote:

Fixed in r48544

Rather than doing this after the page loads, via javascript, I made it so that those links don't get rendered at all in the printable version of the page. This means that the printable version will now be cached separately, which was not the case prior to this change.