plotly / plotly/plotly.js

Right click triggers drag event on some machines & fails to fire `plotly_click`

Open
#7,398 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Right clicking charts doesn't fire the plotly_click event on my machine. Here is a minimal stackblitz reproduction. The examples in the docs behave the same for me.

Instead, it seems right click opens the default context menu and starts a drag, and when I click elsewhere I get the event firing for the second click, and then the chart zooms:

Image

It seems this bug only occurs in certain machines:

  • I'm running NixOS with a Gnome desktop and reproduce the bug in Firefox and Chrome.
  • A colleague on Windows with Chrome did not reproduce
  • I failed to reproduce on my partner's Ubuntu machine with Firefox.

Likely related to:

Possibly related to:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal StackBlitz reproduction in main.js and compare its behavior with the chart examples in the documentation on the reported browsers and desktop environments. Read related issues #5311, #6633, #7311, #2101, and #6329 for existing context. Done means right-clicking no longer starts a drag or opens an unexpected interaction, and plotly_click fires consistently without unintended zooming.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.