Skip to content

Fix: allow dismissing photo picker on macOS when Photos library is empty#508

Open
stakeswky wants to merge 1 commit intokeepassium:masterfrom
stakeswky:fix/507-photo-picker-dismiss
Open

Fix: allow dismissing photo picker on macOS when Photos library is empty#508
stakeswky wants to merge 1 commit intokeepassium:masterfrom
stakeswky:fix/507-photo-picker-dismiss

Conversation

@stakeswky
Copy link

Fixes #507

Problem: On Mac Catalyst, when the user's Photos library is empty, the PHPickerViewController has no cancel button and isModalInPresentation defaults to true, preventing dismissal via Escape or clicking outside the sheet. The user is trapped and must force-quit.

Fix: Set isModalInPresentation = false on Mac Catalyst so the picker sheet can always be dismissed interactively (Escape key or clicking outside).

Also corrects swapped extension conformance labels — PHPickerViewControllerDelegate and UIAdaptivePresentationControllerDelegate were on the wrong extensions (no behavioral change, just correctness).

@CLAassistant
Copy link

CLAassistant commented Feb 22, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

…pty (keepassium#507)

On Mac Catalyst, PHPickerViewController defaults to isModalInPresentation = true,
which prevents dismissal via Escape or clicking outside the sheet. When the Photos
library is empty, the picker shows no cancel button, trapping the user.

Set isModalInPresentation = false on Mac Catalyst so the sheet can always be
dismissed interactively.

Also fix swapped extension conformance labels (PHPickerViewControllerDelegate
and UIAdaptivePresentationControllerDelegate were on the wrong extensions).
@stakeswky stakeswky force-pushed the fix/507-photo-picker-dismiss branch from e184a5f to 658ed1c Compare February 26, 2026 20:23
@stakeswky
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't close icon picker when macOS Photos library is empty

2 participants