Page MenuHomePhabricator

Simplify oncopy behavior
ClosedPublic

Authored by sophiebits on Apr 3 2014, 8:24 AM.
Tags
None
Referenced Files
F14062838: D8688.diff
Mon, Nov 18, 2:45 PM
F14053357: D8688.diff
Fri, Nov 15, 3:06 PM
F14038479: D8688.diff
Sun, Nov 10, 11:50 PM
F14022816: D8688.diff
Wed, Nov 6, 7:59 PM
F13999601: D8688.diff
Thu, Oct 24, 3:53 PM
F13962712: D8688.id20600.diff
Oct 15 2024, 11:50 AM
Unknown Object (File)
Oct 9 2024, 3:47 PM
Unknown Object (File)
Oct 1 2024, 10: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
Branch
simplify-oncopy
Lint
Lint Passed
Unit
No Test Coverage

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).