Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open new window when share api is not provided. #325

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

kinoppyd
Copy link
Member

No description provided.

@kinoppyd kinoppyd requested a review from Copilot March 28, 2025 09:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a fallback behavior for cases where the Web Share API is not supported, by opening a new window instead of displaying an alert message.

  • Changed fallback behavior from alert to opening a new window.
  • Updated share controller logic to invoke window.open with the provided URL.
Comments suppressed due to low confidence (1)

app/javascript/controllers/share_controller.js:17

  • Replacing the alert with a window.open call alters the user feedback mechanism; consider verifying that this.urlValue is a well-formed URL to prevent potential runtime issues if an invalid value is provided.
window.open(this.urlValue, "_blank")

@kinoppyd kinoppyd merged commit 3237c00 into 2025 Mar 28, 2025
2 checks passed
@kinoppyd kinoppyd deleted the fixes/alt_plan_to_no_implements_share branch March 28, 2025 09:53
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.

1 participant