HomePhabricator

Simplify oncopy behavior

Description

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.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D8688

Details

Provenance
sophiebitsAuthored on
epriestleyCommitted on Apr 3 2014, 4:20 PM
epriestleyPushed on Apr 3 2014, 4:21 PM
Reviewer
Blessed Reviewers
Differential Revision
D8688: Simplify oncopy behavior
Parents
rP3e6bfda0ca1a: (Celerity) Fix mimetype for JPEG files so IE will load them
Branches
Unknown
Tags
Unknown

Event Timeline