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
@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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