Skip to content

The "Contact Us" buttons don't open up email on tauri #337

Closed

Description

@AnthonyRonning

These work on the web, but is there a special thing we have to do to get this to work? it's on the about us dialog and pricing page (at least).

I tested on tauri ios and tauri desktop, i have not tested android yet but probably there too. is there any special tauri v2 things we need to do to get that to work? I would expect that it opens up the email client on these native platform types.

Activity

  1. AnthonyRonning commented on Dec 5, 2025

    @AnthonyRonning
    ContributorAuthor

    @claude can you investigate this bug for our tauri versions of the app?

  2. claude commented on Dec 5, 2025

    @claude
    Contributor

    Claude finished @AnthonyRonning's task —— View job • claude/issue-337-20251205-1816 • Create PR ➔


    Fix for "Contact Us" buttons not opening email on Tauri

    Summary

    Fixed the bug where "Contact Us" buttons didn't open the default email client on Tauri platforms (iOS, Android, and desktop). The issue was that mailto: links require Tauri's opener plugin to properly launch external applications.

    Changes Made

    1. AccountMenu.tsx (frontend/src/components/AccountMenu.tsx)

      • Updated "Contact Us" menu item to use handleOpenExternalUrl instead of a plain <a href="mailto:..."> tag
      • Enhanced handleOpenExternalUrl function to detect and handle ALL Tauri platforms (not just mobile)
      • Now uses @tauri-apps/api/core.isTauri() to check if running on Tauri
      • Uses plugin:opener|open_url command for Tauri platforms with fallback to window.open for web
    2. pricing.tsx (frontend/src/routes/pricing.tsx)

      • Imported isTauri from platform utilities
      • Updated two instances where window.location.href = "mailto:..." was used for "Contact Us" functionality
      • Now uses Tauri opener plugin for all Tauri platforms with proper fallback to window.location.href for web

    Technical Details

    The fix works by:

    1. Detecting if the app is running on any Tauri platform (desktop or mobile)
    2. Using the Tauri opener plugin (plugin:opener|open_url) to open mailto links
    3. The plugin opens the system's default email client with the mailto URL
    4. Falling back to standard web behavior if not on Tauri or if the plugin fails

    Testing

    Build checks passed:

    • ✅ Format: All files properly formatted
    • ✅ Lint: No errors (13 pre-existing warnings)
    • ✅ Build: Successful compilation
    • ✅ Pre-commit hooks: All checks passed

    Next Steps

    Please test on your Tauri platforms (iOS, Android, desktop) to verify the fix works as expected. The changes maintain backward compatibility with the web version.


  3. added a commit that references this issue on Dec 5, 2025
    dc0b412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions