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.
Comment 1 by paulkin...@google.com
, Jul 5