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

[BUG] - Copy to clipboard failure not displayed #2863

Closed
5 of 6 tasks
ekcom opened this issue Dec 18, 2023 · 5 comments · Fixed by #2886
Closed
5 of 6 tasks

[BUG] - Copy to clipboard failure not displayed #2863

ekcom opened this issue Dec 18, 2023 · 5 comments · Fixed by #2886
Assignees
Labels
bug: confirmed bug Something isn't working

Comments

@ekcom
Copy link
Contributor

ekcom commented Dec 18, 2023

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

When a copy to clipboard fails, a toast still appears saying "Copied!" as a success message, which is conveying false information to the user.

Errors are still logged to the console about the copy failing.

This occurs, e.g., when the user is connected insecurely to a website and the browser rejects copy to clipboard requests, but also happens anytime a copy command fails.
This is especially relevant for fresh Mealie instances which do not have TLS (SSL) configured yet.

Steps to Reproduce

  1. Navigate to a Mealie instance using http for an unsecured connection
  2. Click a copy button
  • E.g., /admin/manage/users -> click a user -> "Generate Password Reset Link" -> click the copy button

Please provide relevant logs

N/A

Mealie Version

No response

Deployment

Docker (Linux)

Additional Deployment Details

Not easily reproducible on the demo site since it forces https.

@ekcom ekcom added bug Something isn't working triage labels Dec 18, 2023
@michael-genson
Copy link
Collaborator

Do you have any examples of the error logs when trying to copy over HTTP? Just so we have it here on the issue

@ekcom
Copy link
Contributor Author

ekcom commented Dec 18, 2023

I do not on hand. If I recall correctly, it was just a stack trace of minified JS, so not very useful.
I would just catch the call to window.navigator.writeText

@clarkwmcd
Copy link

I am having the same issue on the ingredients list. When the copy button is clicked it say "Copied!" but there is nothing to paste.

@Kuchenpirat
Copy link
Collaborator

@clarkwmcd are you meaning if you copy the ingredient list you can copy from the shopping list or from somewere else?
because the shopping list should catch if copy is supported.

@Kuchenpirat Kuchenpirat self-assigned this Dec 29, 2023
@Kuchenpirat
Copy link
Collaborator

i just found the error for the shopping list. It checks isSupported and not isSupported.value so it never enters the fail state.

This will be fixed in an upcomming pr along with the rest of the copy boxes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants