New issue
Advanced search Search tips

Issue 860563 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome , Mac
Pri: 3
Type: Feature

Blocked on:
issue 860562



Sign in to add a comment

Unable to put a file onto the clipboard in the oncopy event for use in later paste in the OS

Project Member Reported by paulkin...@google.com, Jul 5

Issue description

Chrome Version:69.0.3473.0 (Official Build) dev (64-bit)

What steps will reproduce the problem?
(1) https://drop-test.glitch.me/
(2) CTRL-C - will raise the oncopy event
(3) Go to any file manager.
(3) CTRL-V - 
What is the expected result?

I would expect the file to be pasted into the operating systems directory...

document.documentElement.addEventListener('copy', (event) => {
  const file = new File(['hello world'], 'testing.txt', {type: 'text/plain'});
  event.clipboardData.items.add(file);
  event.preventDefault();
});


What happens instead?

Nothing.

It looks like clipboardData.files (and items, when it is a file) is cleared straight after oncopy event.

It's impossible to paste content that was generated by the origin to anywhere on the users system. This functionality is needed for any level of system parity between the web and other apps.
 
 
Summary: Unable to put a file onto the clipboard. (was: Unable to read a file from the clipboard on Chrome OS (when Google Docs can.))
Summary: Unable to put a file onto the clipboard in the oncopy event for use in later paste in the OS (was: Unable to put a file onto the clipboard.)
Cc: c...@chromium.org jsb...@chromium.org pwnall@chromium.org
Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
Copying files via clipboard seems like a new capability. We don't support that now. I agree that it'd be needed for parity with native apps.

Adding jsbell@ since he's generally looking at this space. Marking available because we have no current plans to work on this.
Blockedon: 860562

Sign in to add a comment