Skip to content

macOS engine: a background Chrome text-field click in shared mode focuses the field through AXFocused, and says the caret was not placed #283

Closed

Description

@SSFSKIM

Problem & intent

#282 makes a shared-desktop left click into a background Chromium web area take the element route (the hit's AXPick or AXPress, route 1, no mouse event) when the hit advertises an action. Otherwise the click is refused with backgroundClickRefused and nothing is posted.

The most common refused case will be a click into a background Chrome text field or text area: an AXTextField or AXTextArea, or a contenteditable element (AXGroup or AXTextArea with AXEditableAncestor). These advertise no press action. The model usually clicks there to focus the field before typing. Today that click is refused, so a "click the field, then type" sequence into a background Chrome page fails at its first step.

Intent. Add a second element route for a plain single left click whose hit is an editable text element inside a web area: set AXFocused true on the hit, with no mouse event and no window ordering, so the field takes keyboard focus.

The difference has to be said. A click places the caret at the point. Setting AXFocused does not: Chromium puts the caret wherever its focus logic decides (usually where the field's last selection was, or at the start or end). The result must state this:

  • the meta's elementClick.reason gets a new value, for example focusedNotPlaced;
  • the result says the field was focused, not clicked, and that the caret may not be at the point;
  • the model can then place the caret itself if it matters (a key such as ⌘→, or select_text, or set_value).

Constraints

Measurement plan

Run it on background Chrome for Testing behind TextEdit, on the counters page plus a page with an input, a textarea and a contenteditable div, each holding known text. Run it on the hosted runner if #282's probe shows the grants there; otherwise in an attended MacBook slot. For each editable kind, 3 repetitions of the click at a point in the middle of the text. Read:

  • whether the element took focus: document.activeElement, the page's focus counters, and the AX focused element;
  • where the caret landed: selectionStart and selectionEnd, or the Selection for contenteditable, against the offset under the point;
  • the order watcher and the frontmost app: no raise, TextEdit stays in front;
  • the page's pointer and mouse counters: 0, since no mouse event was posted;
  • a follow-up type_text of a marker string: where it landed;
  • the time from post to focus.

Report the caret's landing rule per kind. If it is deterministic, say so in the result's sentence ("the caret is at the end of the field"). If not, keep the generic sentence.

Success criteria

Sources

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    on Nov 5, 2026
  2. SSFSKIM commented on Nov 5, 2026

    @SSFSKIM
    OwnerAuthor

    Data from #282's hosted probe (run 42131623237; probe/282-hosted; CfT 156 on macOS 26.6.2 and 26.7.2, two reps alike):

    • After the engine's first observation of a background Chrome (enablementPrior false), its page controls advertised only [AXShowMenu, AXScrollToVisible] until Chromium's complete accessibility mode arrived, 1.6–1.7 s later. From then on they also advertised AXPress.
    • With complete mode on, AXPress on a <textarea> focused it: document.activeElement was the textarea, the textFocus count was 1, no pointer events fired, and TextEdit stayed frontmost.
    • Before complete mode, the same AXPress answered success and did nothing.

    So for this ticket, AXPress may be an alternative to setting AXFocused, but only once complete mode is on. The caret-placement question is unchanged. #282 refuses text-entry roles in shared mode (the design session's allowlist), so this route stays #283's.

    Sminos-Session: cursor235#b93055dd (cua on macbook)

  3. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 6, 2026
  4. SSFSKIM commented on Nov 6, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: taken by cursor235 after #284 merged

  5. 13 remaining items

  6. added 2 commits that reference this issue on Nov 23, 2026
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

    enhancementpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions