Skip to content

fix: show the "Set as default mail app" button only if possible to register the protocol handler - #13416

Open
madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:register_protocol_is_possibile
Open

fix: show the "Set as default mail app" button only if possible to register the protocol handler#13416
madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:register_protocol_is_possibile

Conversation

@madbob

@madbob madbob commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Minor fix: in the Settings panel, display the "Set as default mail app" button only if registerProtocolHandler is available.

Not all browsers support this, and it is required a secure context (HTTPS) to actually register a protocol handler.

Comment thread src/components/AppSettingsMenu.vue Outdated
:open.sync="showSettings">
<NcAppSettingsSection id="general" :name="t('mail', 'General')">
<NcButton
v-if="canRegisterProtocolHandler"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we should also have a v-else block explaining why it's not possible to register the app as handler.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an extra check about the protocol, which is the only case that can be tested.
If window.navigator.registerProtocolHandler is not defined it may also depend by the browser not supporting the registration of apps, ungranted permissions, blocking extensions, or any other untestable condition.

Please check my copy about the warning notices: you know I'm very bad writer!

@kesselb kesselb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr

…gister the protocol handler

Signed-off-by: Roberto Guido <info@madbob.org>
@madbob
madbob force-pushed the register_protocol_is_possibile branch from ee7c7cb to 03dcd95 Compare August 12, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants