Skip to content

Conversation

@StTronn
Copy link

@StTronn StTronn commented Nov 5, 2025

Fixes #5976

On macOS, Ctrl+Click is functionally equivalent to right-click but was not
recognized by Univer. This commit adds support by checking for Ctrl+Click
(button 0 with ctrlKey) in addition to right-click (button 2).

Changes:

  • Update all three pointer down handlers (main area, row/col headers)

Description

On macOS, Ctrl+Click is functionally equivalent to right-click but was not recognized by Univer's context menu system. This PR adds support for Ctrl+Click to open context menus, matching the behavior of native macOS applications
like Chrome and Safari.

How to test

  1. Open any Univer spreadsheet
  2. Select a cell
  3. Hold Ctrl and click on the cell (Ctrl+Click)
  4. ✅ Context menu should appear
  5. Also verify right-click still works normally
  6. Verify normal clicks without Ctrl are not affected

On Windows/Linux:

  1. Verify right-click context menu still works as before
  2. Verify Ctrl+Click does NOT trigger context menu (expected behavior)

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

  Fixes dream-num#5976

  On macOS, Ctrl+Click is functionally equivalent to right-click but was not
  recognized by Univer. This commit adds support by checking for Ctrl+Click
  (button 0 with ctrlKey) in addition to right-click (button 2).

  Changes:
  - Update all three pointer down handlers (main area, row/col headers)
@StTronn StTronn requested a review from jikkai as a code owner November 5, 2025 19:54
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

View Deployment

📑 Demo (React@19) Demo (React@16) 📚 Storybook
🔗 Preview link 🔗 Preview link 🔗 Preview link

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.

[Bug] Lack of Support for Ctrl + Click to Open Context Menu in Univer Spreadsheet (macOS)

1 participant