Skip to content

Change default doubleClickDelay to 500ms (from 300ms) - #8014

Merged
emilykl merged 2 commits into
mainfrom
double-click-delay-500ms
Sep 3, 2026
Merged

Change default doubleClickDelay to 500ms (from 300ms)#8014
emilykl merged 2 commits into
mainfrom
double-click-delay-500ms

Conversation

@emilykl

@emilykl emilykl commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #8013 (see also original discussion in #6538)

Increase Plotly's default double-click delay to 500ms, to align with the most common OS defaults.

Steps for testing

  1. Run the devtools dashboard and open any mock with a legend, for example legend_horizontal
  2. Experiment with how fast you need to double-click a legend item in order to hide all other traces. If you double-click too slow, your clicks will be interpreted as single clicks and the clicked item will simply hide and then show again quickly
  3. Do the same experimentation on main. Notice that the double-click speed threshold is noticeably slower on this branch compared to main.

@emilykl
emilykl merged commit 8070ed5 into main Sep 3, 2026
410 of 414 checks passed
@emilykl
emilykl deleted the double-click-delay-500ms branch September 3, 2026 18:18
@oscarrutt

Copy link
Copy Markdown

Thanks for at last for looking into this. However, as emilykl mentioned on another thread, on macOS the current setting for double-click delay is found by

% defaults read -g com.apple.mouse.doubleClickThreshold
0.5

So why can't Javascript run this command and read the output?

@emilykl

emilykl commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@oscarrutt That's a shell command, so unfortunately there's no way to run it from JavaScript in the browser.

@oscarrutt

Copy link
Copy Markdown

@emilykl Thanks. I didn't know that. Most languages have some facility for that but I suppose JavaScript limits this for security. Thanks for your help on this little annoyance in Plotly.

@emilykl

emilykl commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@oscarrutt Yeah, if we were running as a desktop app I think we'd be able to get this info but for security/privacy reasons, what's available in the browser is pretty limited.

Ultimately I think the most correct approach would be a refactor to use double-click event handlers, so we'll look into whether that's possible and feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase default plotly.js double-click delay to 500ms (from current 300)

3 participants