New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600675 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

"File chooser" dialog in extension's popup works weird

Reported by nekr.fab...@gmail.com, Apr 5 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Steps to reproduce the problem:
1. You have to sign in
2. Click "Upload files"

What is the expected behavior?
Files chooser dialog stays fully visible

What went wrong?
Files chooser dialog is partially visible

WebStore page: https://chrome.google.com/webstore/detail/oumy/nhppnglfodcebhkiledbemaagpnelkel

Did this work before? N/A 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: OS X 10.11.4
Flash Version: Shockwave Flash 21.0 r0

I recorded a video to demonstrate problem: https://youtu.be/beF5sNbstO8.
 
Cc: shrike@chromium.org
Status: Untriaged (was: Unconfirmed)
+shrike who's been looking at the file chooser on Mac. 
Components: -Platform>Extensions UI>Browser
This doesn't sound extensions-specific.  Feel free to re-add the label if appropriate.
Cc: tapted@chromium.org erikc...@chromium.org
Status: Available (was: Untriaged)
Someone will need to investigate. 

Comment 4 by tapted@chromium.org, Apr 19 2016

Components: Platform>Extensions
Labels: -Pri-2 -OS-Mac OS-Windows Pri-3
Status: Untriaged (was: Available)
For Mac, I think this is working as intended, thanks to a fix I did in  Issue 61632  (before that it was more broken on Mac). It is specific to the browser action popup that extensions use.

The sheet is attached to the browser action popup. OSX can reposition the sheet if it wants too and, for small browser action popups, it does. You can't move sheets - just the window it's attached to. In this case that's the browser window, and moving that works fine for me, and the popup stays open.

If anything this is a bug on Windows (maybe other OSes), because they don't have the fix in  Issue 61632 . On Windows, if you open the open/save dialog from a browser action popup, then click the browser, the extension browser action popup closes. The open file dialog stays open, but it's (invisibly) lost its connection to the browser action popup. Then selecting a file "doesn't go anywhere", since the WebContents that initiated the action has gone away.

Reopening for extensions triage in case they are interested in the Windows problem, but I don't think there's anything to do here for Mac.
Thanks for responding here!

First of all, there is no such bug on Windows, see this screenshot: https://i.imgsafe.org/5f7595d.png

While I understand why it happens on OS X and that you cannot move file-chooser dialog, this doesn't mean this bug shouldn't be fixed. It hurts my extension, for example.

Here is some hack I made to fix it: https://youtu.be/Cpa3hrItA-Y
As you see, I resize window to match file-chooser dialog size, so it stays in-screen. But there is a problem--DOM doesn't have API which informs developer when file-chooser dialog is closed/canceled and I have to do a hack--resize popup back on mousemove inside popup. But, of course, this doesn't always work, see last try in the video.

My suggestions to fix this is:

* Do the same as I do--open big enough transparent window behind file-chooser dialog and remove it on dialog closed (you have a 'cancel' event, I bet)
* Provide 'cancel' event for <input type="file">, this won't hurt anyone, even if this will be done not only for extension contexts
* Make file-chooser API available on all platforms, not only on Chrome OS


Choose one :-) And please, this isn't Pri-3.. why?
Oh, my bad, `fileSystem` API isn't available even for Chrome OS inside extension, it's Apps-only API. Why not have it for extensions too?

Comment 7 by tapted@chromium.org, Apr 20 2016

I don't think the browser action popup was ever intended to have child windows. That it works at all is a bit of an accident.

The problem you describe isn't really something we can fix on Mac without hacks of our own - positioning of the sheet is done by OSX. When the sheet would go off-screen, OSX likes to move the window, but it can't do that for a bubble/browser action popup.

I think your workaround is actually pretty neat :). You could also just make your initial popup big enough to always host the child dialog.

I think the correct/supported way for extensions to show save/open file dialogs would be with a popup window. E.g. chrome.windows.create(..). An extension will have more control over the lifetime of those windows, and won't have to worry about the bubble being accidentally dismissed (i.e.  Issue 61632 , which was for Mac, but the problem still exists on Windows, AFAIK). It's also a type of window that OSX can reposition if it wants to when showing a sheet.

Comment 8 by shrike@chromium.org, Apr 24 2016

> positioning of the sheet is done by OSX

FWIW, on the Mac there is window delegate API for adjusting the proposed position of sheets.

Status: Available (was: Untriaged)
Friendly neighborhood extension triager - marking this bug as available since it looks like appropriate folks have already been looking at it. 


Project Member

Comment 10 by sheriffbot@chromium.org, Sep 25 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Archived (was: Untriaged)
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment