Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Windows: Open Folder dialog is not accessible with 'multiSelections', 'openDirectory', 'createDirectory' #48631

@bpasero

Description

@bpasero

Preflight Checklist

Electron Version

37.4.0

What operating system(s) are you using?

Windows

Operating System Version

Windows 11

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

A file dialog is keyboard accessible:

  • Ctrl+N focuses to the input field
  • Alt key can be pressed to jump to the buttons.

Actual Behavior

No keyboard accessibility.

Testcase Gist URL

No response

Additional Information

Fiddle to reproduce:

// Display native system dialogs for opening and saving files, alerting, etc.
//
// For more info, see:
// https://electronjs.org/docs/api/dialog

const { app, BrowserWindow, dialog } = require('electron/main')

app.whenReady().then(async () => {
  const mainWindow = new BrowserWindow({ height: 600, width: 600 })

  // Show an "Open File" dialog and attempt to open
  // the chosen file in our window.
  try {
    const { filePaths, canceled } = await dialog.showOpenDialog(mainWindow, {
     properties: [ 'multiSelections', 'openDirectory', 'createDirectory' ]
    })
    if (canceled) {
      console.log('Dialog was canceled')
    } else {
      const file = filePaths[0]
      mainWindow.loadFile(file)
    }
  } catch (err) {
    console.log(err)
  }
})

//cc @codebytere

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions