plotly / plotly/plotly.js

zoom behaves incorrectly when dragging with right mouse button held down

Open
#5,311 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When having zoom enabled, I can use the left mouse button to drag a box around the area of interest and get a zoomed in version of my graph.

However, when I'm doing the exact same action with not the left mouse button held down, but the right mouse button held down there should not be any zoom applied. The current behaviour is, that I drag with the right mouse button held down, no box is drawn, but if I release the right mouse button there is zoom applied showing data within a distance of two units around the initially right-clicked point.

It is reproducible in this stackblitz.

Please feel free to ask, if you need any other details.

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 linked StackBlitz reproduction in script.js and trace the chart's zoom drag and mouse-button handling. Confirm the current right-button behavior, then identify the relevant interaction code and tests; done means dragging with the right button held does not apply zoom after release, while left-button zoom still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.