Closed Bug 1366794 Opened 9 years ago Closed 8 years ago

Cannot drag and drop more one file with Firefox 53 in application Kodak InSite Prepress Portal

Categories

(Web Compatibility :: Site Reports, defect, P3)

Firefox 53
defect

Tracking

(firefox53 wontfix, firefox54 wontfix, firefox55 affected)

RESOLVED FIXED
Tracking Status
firefox53 --- wontfix
firefox54 --- wontfix
firefox55 --- affected

People

(Reporter: douglasw, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [sitewait])

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170504105526 Steps to reproduce: Select multiple files (pdfs) on my hard drive. Drag them to a HTML5 based upload site. (FTP upload like site) Using a Mac (ver 10.11.6) and a PC (win10) using Firefox 53.0.3. Actual results: Regardless of how many files are selected it will only show that one file is queued on the html5 web page. Expected results: Before Firefox 53, I could move hundreds of files into the FTP queue per se and start the upload. Now it only moves one file at a time so we have to drap and drop multiple times. Seems something changed in version 53 because I have a version 52 Firefox (on PC and Mac) that works fine. Assuming something got changed in the HTML5 drag and drop code?
Do you have the URL of a public upload site to reproduce the issue?
Flags: needinfo?(douglasw)
Component: Untriaged → Drag and Drop
Product: Firefox → Core
Flags: needinfo?(douglasw)
Thanks, I'm able to repro the issue, and I'll try to find a regression range.
Regression range: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=083ffc01652a13e80d12288074fd5dbc39621e93&tochange=7de007e9921283029004cb7a274eb6a5b27a6f56 Andrea Marchesini — Bug 1321525 - FileReader.readAs* should throw if called nested, r=smaug baku, is it expected after your patch?
Blocks: 1321525
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Drag and Drop → DOM
Flags: needinfo?(douglasw)
Keywords: regression
Do need something from me? If you do I'm not sure what you are asking. Says needinfo?(douglasw@spiweb.com)
Flags: needinfo?(douglasw)
(In reply to douglasw from comment #5) > Do need something from me? If you do I'm not sure what you are asking. > > Says needinfo?(douglasw@spiweb.com) Oops, sorry, I wanted to NI baku, not you. :)
Flags: needinfo?(amarchesini)
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is part of your code: var reader = new FileReader(); // loop over drag files and add them to files list if they do not exist already for (var i = 0; i < files.length; i++) { try { // if it is folder, firefox will throw exception directly // ie skip the folder automatically, don't need extra dealer if (navigator.userAgent.indexOf("Firefox") > 0) { reader.readAsText(files[i].slice(0, 4)); } FileUploaderControl.PushFileToFileList(files[i]); } catch (e) { continue; } By spec: "When the readAsText(blob, label) method is called, the user agent must run the steps below. If readyState = LOADING throw an InvalidStateError and terminate this algorithm." Here you are calling readAsText() for each file. Only the first one will continue the operation. Until that is running, any other readAsText() will fail. The easiest way to fix your code is this: for (var i = 0; i < files.length; i++) { try { if (navigator.userAgent.indexOf("Firefox") > 0) { var reader = new FileReader(); reader.readAsText(files[i].slice(0, 4)); } FileUploaderControl.PushFileToFileList(files[i]); } catch(e) { continue; } } Or... much much much better: evt.dataTransfer.getFiles().then(files => { for (var i = 0; i < files.length; ++i) { FileUploaderControl.PushFileToFileList(files[i]); } }); If you want to have also files in sub-directories, just do: getFiles(true /* recursive */)
Flags: needinfo?(amarchesini) → needinfo?(douglasw)
Ok so you believe it is the Kodak Insite code that is written incorrectly? I can talk to them about fixing it. I guess the question that they will have is why is it not a problem in Firefox 52 and earlier?
Flags: needinfo?(douglasw)
> I guess the question that they will have is why is it not a problem in > Firefox 52 and earlier? mainly because in FF52 that check was not correctly implemented :) Another important issue is that, that code reads the whole file and stores it in memory: try to drag&drop a file of 1Gb and you will see that FF will try to allocate 1Gb for reading the full size of your file: it seems to me a bit too much for a simple directory checking.
ok thanks!
Let's change the component to TE as the software editor Kodak Insite needs to changes the code of its application properly.
Component: DOM → Desktop
Product: Core → Tech Evangelism
Summary: Firefox 53.0.3 drag and drop issue → Cannot drag and drop more one file with Firefox 53 in application Kodak InSite Prepress Portal
Version: 53 Branch → Firefox 53
Was told I can delete this bug from this page but I can't see how. Can someone delete this for me please? Thanks
Not this bug, the testcase on your server you provided in comment #2. Just remove the testing account "firefox".
I'll go ahead and hide the comment with the test account.
Thanks for helping douglasw, if you aren't able to get in touch with Kodak, please let us know so we can try as well.
I know they are looking into it. I know they put an alert out there Yesterday to not upgrade to 53 on their support site.
Thanks, setting to [sitewait] since they're aware.
Whiteboard: [sitewait]
Hi douglasw, is this issue still reproducing for you?
Flags: needinfo?(douglasw)
Priority: -- → P3
(In reply to Adam Stevenson [:adamopenweb] from comment #18) > Hi douglasw, is this issue still reproducing for you? Hi Adam, Just tried in 59.0.2 64bit on mac 10.11.6 and Yes, it still will not allow multiple files to be drag and dropped.
Flags: needinfo?(douglasw)
Thanks. I'm attempting to reach out to the product manager via LinkedIn.
I heard back. They have a new version of InSite Prepress Portal coming soon which supports Drag & Drop of Multiple files as well as folders. So, this has been fixed. I'm going to close this report for now, but please reopen if the issue still exists when the new version launches.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.