Issue metadata
Sign in to add a comment
|
DataTransferItemList.add(file) Malfunctioning
Reported by
mahdi.ne...@gmail.com,
Mar 14 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3041.0 Safari/537.36 Steps to reproduce the problem: 1. Drag "drag me" in the test case over the drop zone. 2. Look at the console to see the debug output. What is the expected behavior? In response to add the file object to DataTransferItemList using "DataTransferItemList.add(file)" the Google Chrome change the item type to the String when store it and "item.getAsString()" returns the name of File! According to DataTransferItemList interface specification for getting File type item's reference, using "item.getAsFile()" is suggested which works properly in the Mozilla Firefox, but in the Google Chrome it is problematic. What went wrong? In this test all logged type must be "application/json", but when it is stored on DataTransferItemList the Google Chrome change the item type to the String and returns "text/plain" event.dataTransfer.items[0].getAsFile() returns a null . I expect it to return a File as it states in the specs here: https://html.spec.whatwg.org/#drag-data-store Did this work before? No Does this work in other browsers? Yes Chrome version: 59.0.3041.0 Channel: canary OS Version: 10.0 Flash Version:
,
Mar 14 2017
Note that I was testing in 57, so this is not a regression in 59.
,
Mar 14 2017
,
Mar 15 2017
This issue is not duplicate of other topics, because: This issue and issue 438479 has same title but core concern of issue 438479 is async clipboard API. Although current clipboard API has sync behavior and is based on DataTransfer. The user can use below code instead of canvas.toBlob until committed newly async clipboard interface proposal. event.clipboardData.items.add(canvas.toDataURL(...), 'text/uri-list'); The issue 438479 is created on 2014. Issue 271424 emphasis the DataTransferItemList interface, but it behaves incorrectly according to W3 specification and it is unsolved completely but its status is Fixed?! The issue 271424 is created on 2013. From 2013 till now this implementation has faulty behavior.
,
Apr 13 2017
The circumstances described are different, but do you believe that the root cause is? Reopening just to be safe, and marking as blocking issue 438479 to retest after that is fixed.
,
Apr 16 2017
Definitely, DataTransferItemList for Drag & Drop is almost new standard and as I proved, it is not correctly implemented on the Google Chrome. The fault is still remained in latest version. However Issue 271424 has been marked as solved.
,
Apr 17 2017
@pwnall, is this is a dup of 438479?
,
Apr 18 2017
#7: Yes.
,
Apr 18 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by jsb...@chromium.org
, Mar 14 2017829 bytes
829 bytes View Download