When I click on copy button and the browser does not support the clipboard.js pluging, an alert "This browser does not support the clipboard.js plugin, please copy manually." appear. So I suggest to apply the suggested on the plugin's page(https://clipboardjs.com/):
That show a tooltip saying "Press Ctrl+C to copy the selected text" when error event is called because of the safari failures

Comments

attar_eweev created an issue. See original summary.

m.attar’s picture

kenianbei’s picture

Status: Needs review » Needs work

Thanks for the patch... you have extra spaces on these lines:

  1. +++ b/js/clipboard.js
    @@ -45,7 +45,35 @@
    +                ¶
    

    extra spaces

  2. +++ b/js/clipboard.js
    @@ -45,7 +45,35 @@
    +          ¶
    

    extra spaces

  3. +++ b/js/clipboard.js
    @@ -45,7 +45,35 @@
    + ¶
    

    extra spaces

Lastly, as specified in the code comment, the feature detection is not robust enough for production. If I get time I'll look into best options here. Feature detection is always better than user agent detection.

kenianbei’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Status: Needs work » Needs review
Issue tags: -safari, -cross browser compatibility, -Eweev
StatusFileSize
new1.37 KB

Fixes coding issues. Looks like there isn't any easy way to check for features rather than by user agent, so I've left that in. Since there is a final fallback should be fine. Will commit once we get some more people testing.

kenianbei’s picture

Status: Needs review » Reviewed & tested by the community

  • kenianbei committed fc21613 on 7.x-1.x authored by attar_eweev
    Issue #2671740 by attar_eweev, kenianbei: Show a tooltip saying Press...
kenianbei’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.