cotabby
cotabby copied to clipboard
Text mirror caret fallback
Some fields don't expose AX caret bounds (AXBoundsForRange returns nothing), which means we can't place the overlay. Mirror the field in a hidden NSTextView and use NSLayoutManager to compute caret position in field-local coordinates; transform to screen coordinates via the field's AXFrame.
Acceptance
- [ ] When
AXBoundsForRangereturns nothing but the key-event prefix tracker has state for the field, the overlay appears at the mirror-computed position. - [ ] Mirror honors the field's font and line-height when discoverable via AX.
- [ ] Falls back to anchoring against
AXFramebottom-right when mirror can't be built. - [ ] No regression for fields that already provide AX caret bounds.
Parent: #16
Closing for OSS launch cleanup. Complex workaround (hidden NSTextView mirror) without evidence of how many apps actually need it. Can reopen with specific app data.