Skip to content

[Mac] Multiple Simultaneous Downloads Not Working #3154

Closed

Description

@magreenblatt

Original report by vinay kota (Bitbucket: vinay kota).


Reproduction steps:
1. Run the following code

for (let i = 0; i < 10; i++) {
    let blobFile = new Blob(["file"+i])
    var link = document.createElement('a');
    link.href = URL.createObjectURL(blobFile)
    link.download = 'Download.txt';
    document.body.appendChild(link);
    link.click();
    document.body.removeChild(link);
}

2. CEF is showing only save as dialog and only one file is being downloaded. (if we try to download files when a save as dialog is already open, then those download requests are being dismissed and only one download is happening).

‌

Expected Output: Multiple save-as dialogs should be shown and all the files should be downloaded. (This issue is only observed on mac. On windows, multiple save-as dialogs are shown and all files are downloaded as expected)

‌

Version of CEF: 91.1.21+g9dd45fe+chromium-91.0.4472.114. (this is also observed in CEF 88.0.4324.182)

O.S: Mac 10.15.7

‌

This problem is reproducible with cefclient application as well.

This problem is not reproducible on google chrome. (Chrome is showing multiple save as dialogs and is downloading all files).

Context: https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=18487

Activity

  1. magreenblatt commented on Jun 30, 2021

    @magreenblatt
    CollaboratorAuthor

    Original changes by vinay kota (Bitbucket: vinay kota).


    • changed component from "Unclassified" to "Framework"
    • edited description
  2. magreenblatt commented on Apr 16, 2022

    @magreenblatt
    CollaboratorAuthor

    This may be resolved by issue #3314 (quantity restrictions are currently applied by CefFileDialogManager).

  3. magreenblatt commented on Apr 17, 2022

    @magreenblatt
    CollaboratorAuthor

    On Windows, the BaseShellDialogImpl::BeginRun implementation does not support multiple simultaneous dialogs. In Chrome, the files are downloaded without showing a dialog (after prompting about the multiple downloads).

  4. magreenblatt commented on Apr 17, 2022

    @magreenblatt
    CollaboratorAuthor

    For the above reason we will not support multiple simultaneous file dialogs. It should still be possible to download multiple files if multiple dialogs are not displayed (e.g. by implementing CefDownloadHandler::OnBeforeDownload and executing CefBeforeDownloadCallback with |show_dialog|=false).

  5. magreenblatt commented on Apr 17, 2022

    @magreenblatt
    CollaboratorAuthor
    • changed state from "new" to "wontfix"
  6. magreenblatt commented on Apr 19, 2022

    @magreenblatt
    CollaboratorAuthor

    Use Chrome file dialogs on all platforms and runtimes (fixes issue #3314)

    All file dialogs irrespective of source, platform and runtime will now be
    routed through CefFileDialogManager and trigger CefDialogHandler callbacks
    (see issue #3293).

    Adds Chrome runtime support for CefBrowserHost::RunFileDialog and
    CefDialogHandler callbacks.

    Adds Alloy runtime support for internal GTK file and print dialogs on Linux
    subject to the following limitations:

    1. Internal GTK implementation:
      • Cannot be used with multi-threaded-message-loop because Chromium's
        internal GTK implementation is not thread-safe (does not use GDK threads).
      • Dialogs will not be modal to application windows when used with off-screen
        rendering due to lack of access to the client's top-level GtkWindow.
    2. Cefclient CefDialogHandler implementation:
      • Cannot be used with Views because it requires a top-level GtkWindow.

    Due to the above limitations no dialog implementation is currently provided for
    Views + multi-threaded-message-loop on Linux. In cases where both
    implementations are supported the cefclient version is now behind an optional
    --use-client-dialogs command-line flag.

    Expressly forbids multiple simultaneous file dialogs with the internal platform
    implementation which uses modal dialogs. CefDialogHandler will still be notified
    and can optionally handle each request without a modal dialog (see issue #3154).

    Removes some RunFileDialog parameters that are not supported by the Chrome file
    dialog implementation (selected_accept_filter parameter, cef_file_dialog_mode_t
    overwrite/read-only flags).

    → <<cset 2ea7459a89fb (bb)>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Frameworkbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions