Fast clicking on "Save" button opens multiple filePicker

RESOLVED FIXED in Firefox 55
(NeedInfo from)

Status

()

Firefox
Developer Tools: JSON Viewer
RESOLVED FIXED
9 months ago
3 months ago

People

(Reporter: baku, Assigned: baku, NeedInfo)

Tracking

unspecified
Firefox 55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(2 attachments)

Comment hidden (empty)
(Assignee)

Comment 1

9 months ago
Created attachment 8850003 [details] [diff] [review]
jsonview_save.patch
Assignee: nobody → amarchesini
Attachment #8850003 - Flags: review?(odvarko)
Comment on attachment 8850003 [details] [diff] [review]
jsonview_save.patch

Review of attachment 8850003 [details] [diff] [review]:
-----------------------------------------------------------------

I couldn't reproduce the bug manually on my machine, but the patch looks good, thanks!

Honza
Attachment #8850003 - Flags: review?(odvarko) → review+
(Assignee)

Comment 3

9 months ago
I use a debug build. Probably in release it fast enough.

Comment 4

9 months ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2aa13dbce320
JSONView should not open more than 1 filePicker at the same time, r=honza

Comment 5

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2aa13dbce320
Status: NEW → RESOLVED
Last Resolved: 9 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55

Comment 6

5 months ago
Created attachment 8891259 [details]
save button .gif

I tested this bug using Nightly from 2017-03-28 and from 2017-03-27, using the latest Nightly and Firefox 55.0b13 on Windows 10 and the bug is still reproducing (when you click 3 times on the save button, 3 different filePickers are opened). You can check the attached .gif to see what I am trying to say. 

Is it something that I am missing about this problem?
Flags: needinfo?(amarchesini)
Comment hidden (obsolete)
(Assignee)

Comment 8

5 months ago
It seems the code has been changed a lot since my patch landed. This is a regression.
Honza is on PTO. Matteo, are you familiar with this code?
Flags: needinfo?(amarchesini) → needinfo?(zer0)

Comment 9

5 months ago
I am sorry, I made a mistake. I confused filePicker with download pop-up. I retested using JsonView (https://jsonview.com/example.json) on Firefox 55.0b13. The platforms I used were Windows 10 x64, Ubuntu 16.04 LTS x64 and Mac OS X 10.11 and the bug seems fixed. 
I am sorry for the inconvenience it might have caused you.
I can't click fast enough to manually reproduce the problem, but it's possible that I regressed this in bug 1327784, as shown with these steps:

1. Load data:application/json,123
2. Open web console
3. Enter this code:
   var btn = document.querySelector('.btn.save');
   btn.click(); btn.click();

Andrea Marchesini, do you see the problem again with your debug build?
Flags: needinfo?(amarchesini)
(In reply to Andrea Marchesini [:baku] from comment #8)
> It seems the code has been changed a lot since my patch landed. This is a
> regression.
> Honza is on PTO. Matteo, are you familiar with this code?

Sorry for my late reply; no, I'm not familiar with this code. Honza, since you review the first patch can I pass back this to you?
Flags: needinfo?(zer0) → needinfo?(odvarko)
(In reply to Matteo Ferretti [:zer0] [:matteo] from comment #11)
> Sorry for my late reply; no, I'm not familiar with this code. Honza, since
> you review the first patch can I pass back this to you?
Sure

(In reply to Andrea Marchesini [:baku] from comment #8)
> It seems the code has been changed a lot since my patch landed. This is a
> regression. Honza is on PTO. Matteo, are you familiar with this code?
How can I help?

Btw. I can reproduce the problem using steps from comment #10.

Honza
Flags: needinfo?(odvarko)
You need to log in before you can comment on or make changes to this bug.