[0.1.6-alpha.2] Model/Effort menu drops taps on iOS — new drill focus + onBlur closes the panel before click #7002
tigerwho1888
started this conversation in
General
Replies: 1 comment
|
Same root cause, confirmed end-to-end on the desktop counterpart of this case. I reproduced it in desktop macOS Safari (WebKit, no touch, no extension) and posted the analysis, a verified fix with a regression test, and an audit of the other cards that share the Two points specific to this iOS report:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a touch device (iPhone, iOS Safari,
dsh webserved over a private network), the composer's model menu cannot be used: tappingModelorEffortopens the list correctly, but tapping any model/effort row does nothing — no selection, no toast, nomodel/selectionevent on the Host. The panel simply closes. The same selection issued from the Host (session/selectModelover the/apiRPC) succeeds for the same Session, and the same menu works on desktop.This is a regression in 0.1.6-alpha.2: with 0.1.6-alpha.1 on the same device the menu worked (see "Why alpha.2" below).
Component
@deepseek-ai/dsh-client-ui-model-selection—ModelSelect(lib/client.js).Reproduction
dsh webon the machine, page opened in iOS Safari on the phone.Model→ the model list opens (94 rows in my deployment, three provider groups).session/selectModelcall, no toast, and the menu is closed afterwards. Same forEffort→ level rows.Measured tap trace from the device (temporary read-out, capture-phase
pointerdown):pointerdownproves the finger lands on the right button; the click never runs, and no selection starts (no entry in the Host session log).Root cause
alpha.2 added the focus step that runs after drilling into a pane: the
[open, pane]effect calls.focus()on the checked[role="menuitemradio"]row (paneFocus.current = "drill").The next tap on another row fires
focusoutwithevent.relatedTarget === nullon iOS, because mobile Safari does not hand focus to a tapped<button>. That reaches:which reads it as "focus left the menu" and calls
close()— so the panel (acreatePortalondocument.body) unmounts betweentouchstartand the click, the clicked button disappears, and its ReactonClicknever runs. Desktop setsrelatedTargetto the tapped cell, so it never takes this path.Version comparison of
dsh-client-ui-model-selection/lib/client.js:paneFocus.current = "drill").focus()callsSo the closure rule is old, but until alpha.2 nothing inside the menu took focus, and on iOS there was no focus change to misinterpret.
Suggested fix
Ignore a focus change that carries no
relatedTarget(the touch case), or drop theonBlurclose entirely — the menu already closes on an outsidepointerdown(closeOutside), onEscape, and after a selection:(I run that one-line change locally; it restores selection on iOS. Happy to send a PR if you prefer a patch to a Discussion.)
All reactions