Fix support mailto link opening a blank tab#4592
Open
m4cd4r4 wants to merge 1 commit intoOpenFn:mainfrom
Open
Conversation
Pass target="_self" to the Support menu item so clicking the mailto link does not open a new browser tab. Also adds the admin email as a title attribute on the label span, giving users without a mail client configured a way to see and copy the address on hover. Closes OpenFn#2435
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2435.
The Support menu item uses
href="mailto:..."but themenu_itemcomponent defaultstargetto"_blank". This causes the browser to open a new tab when clicked - and when no mail client is configured, that tab stays blank with no feedback to the user.Changes (single file -
live.html.heex):target="_self"to the Support menu item, preventing a blank tab from openingtitle={instance_admin_email()}to the label span so hovering shows the email address - users without a mail client can read/copy itThe
target="_self"behaviour is intentional here: Documentation and Community links correctly keep_blank(external URLs should open in new tabs), butmailto:links should not.AI disclosure
Test plan