Page MenuHomePhabricator

Simplify oncopy behavior
ClosedPublic

Authored by sophiebits on Apr 3 2014, 8:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 4:11 PM
Unknown Object (File)
Tue, Dec 3, 10:21 PM
Unknown Object (File)
Wed, Nov 27, 2:12 PM
Unknown Object (File)
Nov 23 2024, 1:45 AM
Unknown Object (File)
Nov 18 2024, 4:34 PM
Unknown Object (File)
Nov 18 2024, 2:45 PM
Unknown Object (File)
Nov 15 2024, 3:06 PM
Unknown Object (File)
Nov 10 2024, 11:50 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP26c836e1e14e: Simplify oncopy behavior
Summary

Firefox has supported clipboardData since version 22 (Jul 2013), and even IE8 supports it if you look at window.clipboardData instead of e.clipboardData. As a result, we can simplify this code significantly.

I also used (or at least, attempted to) Javelin so that we can get the event object and preventDefault more easily. Plus, this way we don't assign to document.body.oncopy.

Test Plan

Copied a selection including a line number in Chrome, Firefox, and IE8. The line number didn't get copied.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sophiebits retitled this revision from to Simplify oncopy behavior.
sophiebits updated this object.
sophiebits edited the test plan for this revision. (Show Details)
sophiebits added a reviewer: epriestley.
epriestley edited edge metadata.

July 2013 is kind of recent (see D835) but if anyone complains we can revert this and then apply it in a year or two.

This revision is now accepted and ready to land.Apr 3 2014, 4:20 PM
epriestley updated this revision to Diff 20605.

Closed by commit rP26c836e1e14e (authored by @spicyj, committed by @epriestley).