comparison LICENSE-MERGELY.html @ 7091:422671dd32df

css: use pseudo-content trick to prevent diff line numbers from being pasted to text When copy-pasting a diff from Chrome to a text editor, line numbers (on separate lines) would be pasted as well. Even though 'user-select: none' prevents text from being visually selected, in Chrome, the text still gets copied to the clipboard when the user for example presses ctrl-c. (It worked in Firefox.) Instead, don't put the line numbers directly in the DOM, but put them in a data attribute and render them as :before. That will give the same rendering as before but prevent it from being copied. (Firefox will however still add empty lines - that is how <pre> is hardcoded to be rendered when pasting to text.)
author domruf <dominikruf@gmail.com>
date Sat, 16 Dec 2017 22:10:45 +0100
parents aa3b55946089
children
comparison
equal deleted inserted replaced
7090:f0c4fcdd1035 7091:422671dd32df