Actions
Defect #36580
closedFix code copying in common browsers
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
This patch resolves https://www.redmine.org/issues/3382 for:
- Chrome-based browsers (empty lines do not get copied).
- Safari (line numbers are inserted to the copied code, empty lines do not get copied, extra spaces are inserted before each line).
- Firefox (empty lines are inserted to the copied code).
As for Chrome and Safari the only way to make them properly copy empty newlines is to insert a "br" element instead of "pre".
As for Safari, data marked as user-select none will still be copied, thus the content trick used in other SCM apps. It is additionally important to put "a" element right after "th", because otherwise there will be spaces in front of the line.
As for Firefox, there are multiple related issues in their bugtracker:- https://bugzilla.mozilla.org/show_bug.cgi?id=1273836
- https://bugzilla.mozilla.org/show_bug.cgi?id=1528442
- https://bugzilla.mozilla.org/show_bug.cgi?id=1650720
And the only solution seems to mimic pre with div.
Files
Related issues
Actions