Autoclose popups shouldn't close when they open a modal dialog (e.g., file picker)
Categories
(Core :: XUL, defect)
Tracking
()
People
(Reporter: conrad.foucher, Unassigned)
References
Details
(Keywords: dev-doc-needed, leave-open)
Attachments
(1 file, 1 obsolete file)
| Reporter | ||
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Comment 9•9 years ago
|
||
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
Comment 18•9 years ago
|
||
Updated•9 years ago
|
Comment 19•9 years ago
|
||
Comment 20•9 years ago
|
||
Comment 21•9 years ago
|
||
Comment 23•9 years ago
|
||
Comment 24•9 years ago
|
||
Comment 25•8 years ago
|
||
Comment 26•8 years ago
|
||
Comment 27•8 years ago
|
||
Comment 29•8 years ago
|
||
Comment 31•8 years ago
|
||
Comment 32•8 years ago
|
||
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
Comment 35•6 years ago
|
||
Is there any update?
Comment 36•6 years ago
|
||
This is a show stopper for me also. I am using an input type="color". When the color picker dialog shows up the popup window closes and nothing happens.
Comment 37•4 years ago
|
||
This is still am issue, the popup really should study open while a file is picked, this is especially annoying for filesharing add-ons
Comment 38•4 years ago
|
||
Judging by the comments I don't think there will be an update for this anytime soon... :(
Does anybody know a workaround for this?
At first I had a problem with OAuth2 since Firefox closes the popup once a new window is open. The solution was to send OAuth2 data as a message to the background scripts and store it using the Storage then handle it once the popup opens.
But as for File Dialogs it's a different case now. I can't send the file data as a message to the background scripts because the listeners waiting for a file input are just lost once the popup closes.
What I'm trying to do now is trigger the File Dialog from the Background Page but I'm really not sure if this will work.
Honestly I feel that this autoclose behaviour from Firefox is rather a limitation other than anything else, I'm sure I'm not the only one having trouble porting an extension to Firefox because of this...
Comment 39•4 years ago
|
||
Luca, can you surface this / bug 1366330 for triage/prioritization by the add-ons team?
Comment 40•4 years ago
|
||
Hey guys! To anyone who might come across this...
It seems the workaround for this is creating a new window and handling the File Dialog from there.
Even though the popup will close once the window is open, you can still communicate with background scripts using Messages.
So I just send the file data to the background script and save it using storage then read it later when the popup opens.
That's what helped me, hope it helps someone else!
Comment 41•4 years ago
|
||
(In reply to :Gijs (he/him) from comment #39)
Luca, can you surface this / bug 1366330 for triage/prioritization by the add-ons team?
Sure, I just added it to the list of topics to discuss in our weekly standup meeting.
I'm not clearing the needinfo assigned to me yet (to make sure I don't forget to comment here with the outcome of that discussion)
Comment 42•4 years ago
|
||
We briefly discussed about this during today's standup meeting:
-
we were all in agreement that the attempt in bug 1366330 may be more of a workaround than an actual fix:
- the attempt in that bug is based on "setting the noautohide property", and then having some custom logic that decide when we can close the popup (e.g. "when it does lose focus and no modal dialog or input-related popup still open for that browserAction popup window")
-
we would like to hear the perspective of someone that may help us to decide how we may try to tackle this more appropriately in a lower layer:
- despite this being an issue that the extensions are more likely to trigger at the moment, the issue itself is not strictly specific to extensions,
any web-like content that we may load in a popup should be able to trigger the exact same issue (at the moment this isn't something that
we do often in the Firefox UI for anything else, but Shane did recall that it used to be triggered by Firefox UI itself in the past, and maybe the
Pocket button is one more case where we may be able to it the same kind of issue if any of those controls are used in the Pocket popup
window?)
- despite this being an issue that the extensions are more likely to trigger at the moment, the issue itself is not strictly specific to extensions,
Hey Neil,
is there anyone that you can point us to get some help with looking for a reasonable strategy to fix?
Comment 43•4 years ago
|
||
I'm coming at this from the extension, file picker side - maybe we can look at it like this, if the popup calls something and expects a callback or a promise to be coloure fulfilled, the popup should stay open, otherwise it probably should be closed.
I hope this helps, even though I can't contribute much codewise
Comment 44•4 years ago
|
||
- the attempt in that bug is based on "setting the noautohide property", and then having some custom logic that decide when we can close the popup (e.g. "when it does lose focus and no modal dialog or input-related popup still open for that browserAction popup window")
Setting and clearing the autohide attribute should work on Windows and Mac once the popup is open, but it looks like the code that handles this was incorrectly removed in bug 1278282, thinking that that code was a gtk2 only block. Putting back the change to nsMenuPoupFrame::AttributeChanged from that bug should make setting the noautohide attribute work again.
Better though would be to just add a function to XULPopupElement that just calls enableRollup() on that popup element, and remove the ifdef gtk bits from enableRollup. This way, we won't have an issue with the extra implications that noautohide means on gtk. This assumes you need access from js code. If not, you can just call nsXULPopupManager::EnableRollup, as is I assume the case with the file picker.
I don't know how the file picker works to be able to answer how it would determine which popup it was in when opening the dialog.
Comment 45•4 years ago
|
||
Guess the bug isn't still resolved. I was porting my chrome extension to firefox and this is a blocker. Clicking on <input type=file> button closes the popup. Perhaps the devs could reproduce the functionality that keeps popup open (Disable popup auto hide from Inspector) and trigger it here. Wish I could contribute from a code level.
Comment 47•4 years ago
|
||
Same here, this bug prevents me from porting some functionalities from Chrome. Any update?
Updated•3 years ago
|
Comment 48•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 5 duplicates and 17 votes.
:enndeakin, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 49•3 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Comment 50•3 years ago
|
||
(In reply to Release mgmt bot (nomail) [:suhaib / :marco/ :calixte] from comment #49)
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
It is still relevant!
Comment 51•2 years ago
|
||
Updated•2 years ago
|
Comment 52•2 years ago
|
||
I'm running into this issue trying to use file dialog as well. It works in chrome (popup.html stays open) but in firefox the popup is closed when I select a fie.
Comment 53•2 years ago
|
||
(Setting leave-open because the patch in attachment 9323664 [details] will only fix this bug on Windows)
Comment 54•2 years ago
|
||
What's needed to move this forward? Aidan/Greg, looks like you've looked at this - are either of you working to update the patch in response to the review comment from Emilio?
Comment 55•2 years ago
|
||
are you working to update the patch in response to the review comment from Emilio?
Not at the moment, but If Aidan is unavailable, I can pick it up if you want.
Comment 56•2 years ago
|
||
(In reply to :Gijs (he/him) from comment #54)
What's needed to move this forward? Aidan/Greg, looks like you've looked at this - are either of you working to update the patch in response to the review comment from Emilio?
I've been a little busy but will try to work on it- and work on a similar fix for Linux
Comment 57•2 years ago
|
||
(In reply to :Gijs (he/him) from comment #54)
What's needed to move this forward? Aidan/Greg, looks like you've looked at this - are either of you working to update the patch in response to the review comment from Emilio?
Okay, done
Comment 58•2 years ago
|
||
Comment 59•2 years ago
|
||
| bugherder | ||
Comment 60•2 years ago
|
||
Note that the Windows patch has been backed out due to the regression filed as bug 1844733.
Comment 61•2 years ago
|
||
Any news on when this will be re-merged into an upcoming release? Was hoping this would be part of 117.0.
Comment 62•2 years ago
|
||
(In reply to lawrence.sim.geo from comment #61)
Any news on when this will be re-merged into an upcoming release? Was hoping this would be part of 117.0.
:rkraesig, can you comment on plans for this bug given the regression that was uncovered and caused this to be backed out?
Comment 63•2 years ago
|
||
Usually the patch author's responsible for resolving the regression and resubmitting, no? If Aidan's not still interested in working on this (Aidan, are you?), then I don't think there are any plans at present.
Comment 64•2 years ago
|
||
(In reply to Ray Kraesig [:rkraesig] from comment #63)
Usually the patch author's responsible for resolving the regression and resubmitting, no? If Aidan's not still interested in working on this (Aidan, are you?), then I don't think there are any plans at present.
I would definitely still be interested in helping to fix this but that was my first attempt at a PR to Firefox, and I think I would need some guidance on resolving all the externalities this creates.
Comment 65•2 years ago
|
||
(In reply to Aidan Welch from comment #64)
(In reply to Ray Kraesig [:rkraesig] from comment #63)
Usually the patch author's responsible for resolving the regression and resubmitting, no? If Aidan's not still interested in working on this (Aidan, are you?), then I don't think there are any plans at present.
I would definitely still be interested in helping to fix this but that was my first attempt at a PR to Firefox, and I think I would need some guidance on resolving all the externalities this creates.
I suspect resolving all the externalities will involve more than a small patch. (At the very least it requires establishing consensus on what constitutes "proper" behavior when, e.g., the user attempts to minimize the extension popup's parent window while the extension has a file dialog open.)
That said, improvement on the existing behavior should be possible with a small patch along the lines of what you've written. The easiest path forward is probably to resubmit the patch (still as D172884), requesting review from the new "#win-reviewers" group (r?#win-reviewers) instead of naming :cmartin directly. (Further discussion is probably more appropriate for Phabricator.)
Updated•1 year ago
|
Comment 67•1 year ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Comment 68•1 year ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:enndeakin, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Comment 69•1 year ago
|
||
(In reply to Ray Kraesig [:rkraesig] from comment #65)
(In reply to Aidan Welch from comment #64)
(In reply to Ray Kraesig [:rkraesig] from comment #63)
Usually the patch author's responsible for resolving the regression and resubmitting, no? If Aidan's not still interested in working on this (Aidan, are you?), then I don't think there are any plans at present.
I would definitely still be interested in helping to fix this but that was my first attempt at a PR to Firefox, and I think I would need some guidance on resolving all the externalities this creates.
I suspect resolving all the externalities will involve more than a small patch. (At the very least it requires establishing consensus on what constitutes "proper" behavior when, e.g., the user attempts to minimize the extension popup's parent window while the extension has a file dialog open.)
That said, improvement on the existing behavior should be possible with a small patch along the lines of what you've written. The easiest path forward is probably to resubmit the patch (still as D172884), requesting review from the new "#win-reviewers" group (
r?#win-reviewers) instead of naming :cmartin directly. (Further discussion is probably more appropriate for Phabricator.)
Okay, I'll try to do so soon, I've been relatively busy!
Updated•1 year ago
|
Comment 70•1 year ago
|
||
Hi, sorry for all the delay, I was thinking it seems to me the most "correct" behavior would be allowing popups to stay open when other windows are selected. But staying at the same depth as the main browser window rather than drawing over other programs. However, I don't know if this could create other problems.
Comment 71•11 months ago
|
||
Hello, this issue has been open for almost 10 years, could we get an update on this?
This problem is causing significant issues when porting extensions from other browsers to Firefox (as stated on bitwarden/clients#3013 and LucasAschenbach/prompster#6.
In Bitwarden's case, for example, the autohide feature makes the biometric login not work because the popup uses other windows to verify the user identity.
In my opinion, to deliver a good user experience for people moving from other browsers to Firefox it would be best to add a toggle to allow the popup from a certain extension to avoid being closed when the main Firefox window loses focus as a hotfix until a better fix comes in or at least to close this decade-old issue.
Comment 72•5 months ago
•
|
||
To consolidate all of the current discussion about this:
I'd have added these to BugFields#see_also, but I don't know whether that's what it's used for here.
Description
•