NOAA-PMEL / OAPDashboard

The Upload Dashbord for the Ocean Acidifiation Project
The Unlicense
0 stars 2 forks source link

Clicking Done button after upload of additional document causes "Upload Failed" dialog to appear in Firefox #31

Closed lkamb closed 3 years ago

lkamb commented 3 years ago

Firefox is adding a spurious browser history element on form.submit in the Addition Documents page. The Done button calls History.back() to pop the current history off the stack, but with the additional history element, what happens is that the formSubmitComplete() method gets called again with a bogus (empty) result message, causing the Upload Failed warning dialog to be displayed.

lkamb commented 3 years ago

Confirmed (in debug mode) this also happens after uploading new dataset file.

lkamb commented 3 years ago

Hackish fix in f4b2dfe by ignoring spurious call to onSubmitComplete -> processResultMessage if firefox and there was previously a successful upload.