Skip to content

Deliver onClick reliably from embedded macOS windows #41

Closed

Description

@monotykamary

Summary

onClick is not delivered reliably from real embedded macOS windows when GPUIX wires it through GPUI's higher-level on_click gesture. onMouseDown and onMouseUp arrive, but the click gesture is not consistently finalized by the embedded pump. This affects ordinary retained hosts and native custom elements such as motion.div.

The DOM-compatible boundary needed by GPUIX is simpler: emit onClick from primary-button mouse-up, while leaving middle/right buttons to onAuxClick and preserving all-button onMouseDown / onMouseUp delivery.

Expected behavior

  • primary down + primary up: onMouseDown, onMouseUp, and one onClick;
  • right or middle down/up: onMouseDown and onMouseUp, but no onClick;
  • onAuxClick behavior remains unchanged;
  • retained hosts and custom native elements use the same rule.

Reference implementation

No PR is being opened, per the external-contributor policy.

The branch adds native hit-testing regressions for both a div and motion.div, updates the README event contract, and includes a changeset.

Validation

  • React package builds successfully.
  • Changed Rust source passes cargo fmt --check.
  • The same implementation is part of the integration build where 227 native tests and 377 React tests pass.
  • Downstream real-window controls and the 319-test application suite pass.

Is primary mouse-up the desired portable click boundary for embedded GPUIX windows?

Activity

  1. added a commit that references this issue on Sep 14, 2026
    89b6799
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions