Skip to content

[Bug] Ctrl+Drag to Zoom is inaccessible on macOS due to right-click conflict #1973

Description

@buiapp

Describe the bug

The "Select to Zoom" functionality (triggered by Ctrl + Drag) is inaccessible on macOS. In the macOS environment, holding the Control key while performing a left-click is globally interpreted as a Right Click (context menu trigger). Consequently, attempting to zoom results in the browser context menu appearing rather than the selection box being drawn.

To Reproduce

  1. Open an H5Web visualization (e.g., a 2D Heatmap or Line plot) on a macOS device.
  2. Press and hold the Ctrl key.
  3. Click and attempt to drag across the data area.
  4. Observe that the browser's context menu appears immediately, and no zoom selection area is created.

Expected behaviour

The zoom selection should be triggered regardless of the OS-level shortcut, or an alternative modifier key (like Cmd or Shift) should be supported for macOS users to avoid the context menu conflict.

Context

  • OS: macOS
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [Your browser version]
  • H5Web context: [e.g. demo, @h5web/app]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions