Closed Bug 1349538 Opened 7 years ago Closed 7 years ago

Fast clicking on "Save" button opens multiple filePicker

Categories

(DevTools :: JSON Viewer, defect)

defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: baku, Assigned: baku, NeedInfo)

Details

Attachments

(2 files)

      No description provided.
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+
I use a debug build. Probably in release it fast enough.
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
https://hg.mozilla.org/mozilla-central/rev/2aa13dbce320
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Attached image 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)
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)
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)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: