Skip to content

Escape doesn't close the file picker and other embedded pickers #3629

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Escape doesn't close the file picker, location picker or "Save as" dialog of apps (e.g. "Insert image from cloud" in the text editor). Only the dialog's Cancel button and its close button work.

These dialogs embed the files app in an <iframe> (FilePickerModal, LocationPickerModal, SaveAsModal) and move the focus into it once it's loaded. Key events of an iframe stay in its document, so the Escape handling of the surrounding OcModal never gets them, and the embedded files app has no Escape binding for cancelling (only the cancel button posts opencloud-embed:cancel, see EmbedActions.vue).

Reproduction Steps

  1. Open a markdown file in the text editor.
  2. Insert image → "From cloud" (the file picker opens).
  3. Press Escape.

Expected Outcome

The picker closes, like other dialogs and like its Cancel button.

Actual Outcome

Nothing happens, the picker stays open.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions