Repository navigation
Description
Background drag into a Chromium web area: the vendor makes it cleanly; can cua, within its not-interfering rules?
Type: enhancement · Priority: P3 · Parent: #117 · Relates to: #282 · Blocking: no
Question
How does the vendor's engine post a drag into a Chromium web area that is in the background, with no activation and
no interference with the app the person is using? Can cua's engine do the same within its not-interfering rules
(#282's shared mode)?
Why it comes up
In shared mode cua refuses a background drag that starts in a Chromium or Gecko web area, and posts nothing. This is
by design, under #282: the design spec's #282 entry, item 6 (docs/doperpowers/specs/2026-10-18-own-native-engine-design.md
~L1989–1995: "A left click, double click or drag so affected into a Chromium web area is never posted … a drag … is
refused"), implemented in native/engine/Sources/Engine/ScrollDrag.swift (~L181). The refusal names itself as
backgroundClickRefused.
In #117 M5's sitting C (the full form, run 45468052791 at bfa8cf4, hosted macOS, Chrome for Testing), the vendor made
this drag cleanly in 3 of 3 runs. M5 declares the cell as a known capability difference (ruling 1228), so it does not
block the flip. This ticket asks whether cua can close the difference without giving up what #282 protects.
Evidence: chrome/background/drag.select@textedit
The person's app is TextEdit, which is frontmost and key. The target is a textarea on a page in Chrome for Testing,
which is in the background. The drag selects from the second line to the fourth, at points derived from the field's
accessibility frame (8,222 503×127 in an 800×760 window). The prepare ran with Chrome in front, and TextEdit was
brought back to the front before the act.
| engine | run (lane first) | ok | selected | spans lines | page unchanged | TextEdit front and key, before and after | interference (frontmost, focus, activations, route 4) | in-cell ms | answer |
|---|---|---|---|---|---|---|---|---|---|
| vendor | 1 (vendor) | yes | yes | yes | yes | yes / yes | ok (yes, yes, 0, no) | 146 | ok |
| vendor | 2 (cua) | yes | yes | yes | yes | yes / yes | ok (yes, yes, 0, no) | 157 | ok |
| vendor | 3 (vendor) | yes | yes | yes | yes | yes / yes | ok (yes, yes, 0, no) | 121 | ok |
| cua | 1 (vendor) | no | no | no | yes | yes / yes | ok (yes, yes, 0, no) | 16 | backgroundClickRefused |
| cua | 2 (cua) | no | no | no | yes | yes / yes | ok (yes, yes, 0, no) | 7 | backgroundClickRefused |
| cua | 3 (vendor) | no | no | no | yes | yes / yes | ok (yes, yes, 0, no) | 25 | backgroundClickRefused |
- cua's answer, in all three runs: "Google Chrome for Testing's web page does not accept a background click; use a
dedicated desktop, or ask the person to bring Google Chrome for Testing forward". - cua posted nothing. Its engine meta shows the act's
actionInterval {startedAt: null, endedAt: null}. - Before refusing, cua's observation saw the web area:
chromium: true,webAreaSeen: true, and the focused element
index 22, an AXTextArea.
Records: the {vendor,cua}/run-{1,2,3}/result.json files in the run's m5-sitting-c-full-1 artifact.
What to find out
- The vendor's route. Which events does it post, to which pid, and by what call (CGEventPostToPid, a session post, or
something else)? Does it touch Chrome's window order or key state at all? The pinned vendor binary's readable source
and a hosted probe can answer this. Ruling 1198's key-route diagnostic is a model for the probe: per-pid listen-only
taps, plus the window order and key reads before and after. - Why macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282 refuses. macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282 refuses because a background web area may not accept a click or drag without activation, so
the action could be lost or land wrongly. Does the vendor's route avoid that on Chromium generally, or only in this
setup? Check other pages, a drag that starts on non-text content, and Gecko (Gecko: shared-mode page clicks take #282's element route and #283's focus route, since Firefox refuses first mouse #315). - If the vendor's route is safe, what would cua need, and which of cua's not-interfering rules (route 4, activations,
the person's focus and window order) would it have to satisfy? Writing the fix is follow-up work, not part of this
ticket.
Not in scope
The background click refusal itself (#282 / #538) is not reopened here, except as the answer to item 2 bears on it.
Activity
Chrome's background drag is a declared departure (#282, #591), listed…