Skip to content

[FEATURE]: plotly.js should respect OS double-click speed #6538

Open

Description

@oscarrutt

Double-clicking on a zoomed heat map is supposed to return to the default, zoomed-out, view. It does so only intermittently. I can't find a pattern so I can't supply a MWE. My heat map is a subplot. MacBook Pro, MacOS 12.5, Firefox 110.0.1, Python bindings.

Activity

  1. gvwilson commented on Jul 5, 2024

    @gvwilson
    Contributor

    Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

  2. oscarrutt commented on Jul 9, 2024

    @oscarrutt
    Author

    The problem, I eventually learned, is that Plotly doesn't interpret double clicks like macOS does—the two clicks must be closer together than the OS setting to be recognized as a double click and not two single clicks which don't do anything wrt zooming the heat map. macOS has a setting for Double-Click Speed, with 11 detentes on a slider; my setting is on the ninth detente, where 11 is the fastest. Plotly doesn't seem to know this setting and requires an even faster double-click. I have a vague recollection that this is also a programmable Plotly setting but it seems that Plotly should default to the OS setting unless programmed otherwise.

  3. self-assigned this
    on Jul 10, 2024
  4. removed their assignment
    on Aug 2, 2024
  5. changed the title [-]Double-clicking zoomed heat map does not return to default view[/-] [+][FEATURE]: plotly.js should respect OS double-click speed[/+] on Aug 28, 2026
  6. emilykl commented on Aug 28, 2026

    @emilykl
    Contributor

    The double-click delay can be configured via config.doubleClickDelay (default 300ms) but it would be nice if plotly.js could default to using the OS-level setting.

    I suspect that may not be possible, but worth looking into as it would be a nice usability improvement (and good for accessibility as well).

  7. oscarrutt commented on Sep 2, 2026

    @oscarrutt
    Author

    FWIW this problem persists with macOS 26.6 and very recent versions of Plotly, and of course also in surface and all other plots that require double-clicking.

    I am normally-abled and double-clicking at the speed required by Plotly is nearly impossible at least on the first try. Sometimes it takes 3-4 tries to succeed, with attention on clicking as fast as I can. BTW I would be surprised if 300 ms is the actual time, at least as seen by the user.

    Does the macOS API not allow reading the system setting?

    Is config.doubleClickDelay available to the user? If so, where would one set it—in every plot call?

    At least can the Plotly devs set this to something that doesn't require super-powers to operate?

  8. emilykl commented on Sep 3, 2026

    @emilykl
    Contributor

    @oscarrutt You're right. Earlier today I was debugging some double-click behavior in plotly.js and at first I thought there was a bug in the feature, but then I realized I just wasn't double-clicking fast enough.

    The Windows default is 500ms: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setdoubleclicktime

    The Mac default is also 500ms, at least on my machine which I've never changed from the default setting:

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

    I think we should change the plotly.js default to 500ms, I'll open a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions