lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

The share button on posts doesn't seem to work

Open K4LCIFER opened this issue 8 months ago • 5 comments

Requirements

  • [x] This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • [x] Please check to see if this issue already exists.
  • [x] It's a single bug. Do not report multiple bugs in one issue.
  • [x] It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

When clicking the share button, nothing gets copied to clipboard, it hangs for a moment, then a little window pops up asking what to do. If one clicks, for example, copy to clipboard, it still doesn't get copied to clipboard.

This is the window that pops up when I click that button:

Image

To be honest, I'm not 100% sure what I'd expect to happen with that button — I'm not sure what it's intended behavior is. At any rate, it currently doesn't seem to really work at all.

Steps to Reproduce

  1. Click the share button on a post
  2. Observe that nothing gets copied to clipboard
  3. Observe that it hangs for a moment before a little window pops up asking how to share
  4. Observe that clicking "copy to clipboard" doesn't copy to clipboard

Technical Details

OS: Arch Linux, Kernel v6.12.21-1-lts DE: KDE Plasma v6.3.4 Browser: Firefox v137.0

Lemmy Instance Version

0.19.10

Lemmy Instance URL

sh.itjust.works

K4LCIFER avatar Apr 05 '25 03:04 K4LCIFER

Where is this share button in lemmy-ui?

dessalines avatar Apr 07 '25 18:04 dessalines

Where is this share button in lemmy-ui?

Image

K4LCIFER avatar Apr 08 '25 08:04 K4LCIFER

This issue is perhaps related: https://github.com/asimons04/tesseract/issues/40

It produces the same behavior.

K4LCIFER avatar Apr 08 '25 08:04 K4LCIFER

The button is only visible when navigator.canShare is true.

On desktop it is disabled for me, but works on Android (with Firefox based browser). Doing share -> copy copies the post url, share -> Signal app creates a new message with the url.

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#browser_compatibility lists firefox as not supported.

Firefox 71 (Released 2019-12-10) From version 71: this feature is behind the dom.webshare.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

matc-pub avatar Apr 09 '25 16:04 matc-pub

Weird how that specific firefox is showing it. Maybe a KDE thing.

dessalines avatar Apr 09 '25 17:04 dessalines