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

Can not create permalink on safari browser #19994

Closed
iercan opened this issue May 9, 2022 · 2 comments · Fixed by #20058
Closed

Can not create permalink on safari browser #19994

iercan opened this issue May 9, 2022 · 2 comments · Fixed by #20058
Labels
#bug Bug report

Comments

@iercan
Copy link
Contributor

iercan commented May 9, 2022

We've just upgraded superset to 1.5.0. Our users using Safari browser reported that they are not able to create permalink on dashboard or in explore chart. I've also tested it on Safari and confirmed it is not working although it works on Chrome.

When we click "Copy permalink to clipboard " we see below error.
Screen Shot 2022-05-09 at 17 26 15

In my investigation I realized backend creates permalink successfully but somehow frontend throw this error.

How to reproduce the bug

  1. Open a dashboard with safari
  2. Click on 'Copy permalink to clipboard'
  3. See error

Expected results

Permalink should be copied to clipboard

Actual results

UI throws error although backend return success

Environment

  • browser type and version: Safari 14.1.2, Chrome 101
  • superset version: 1.5.0 installed with apache/superset docker image
  • any feature flags active:
    "SQLLAB_BACKEND_PERSISTENCE": True,
    "THUMBNAILS": True,
    "THUMBNAILS_SQLA_LISTENERS": True,
    "LISTVIEWS_DEFAULT_CARD_VIEW": False,
    "ALERT_REPORTS": True,
    "DASHBOARD_NATIVE_FILTERS": True,
    "DASHBOARD_CROSS_FILTERS": False,
    "DRUID_JOINS": True,
    "DASHBOARD_NATIVE_FILTERS_SET": True,
    "DASHBOARD_RBAC": True,
    "ENABLE_EXPLORE_DRAG_AND_DROP": True,
    "ENABLE_DND_WITH_CLICK_UX": True,
@iercan iercan added the #bug Bug report label May 9, 2022
@iercan
Copy link
Contributor Author

iercan commented May 9, 2022

Also this is the error I see on javascript console
Screen Shot 2022-05-09 at 17 36 32

Takes me this code segment

Screen Shot 2022-05-09 at 17 56 48

@villebro
Copy link
Member

I was able to repro. It appears we're using the deprecated copy command which Safari no longer supports:

if (!document.execCommand('copy')) {

Let's replace it with the current best practice and include it in 1.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants