[Bug]: Slash menu drifts away from the composer when dragging on iPad

Open Beginner friendly
#30,685 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with apps/web/src/components/chat/ComposerCommandMenuLayer.tsx and inspect how the layer updates its position from the composer's getBoundingClientRect(). Reproduce on an iPad with the keyboard open, then check how visualViewport resize and scroll events affect the composer and menu. Done when dragging the page keeps the slash menu attached to the composer and the behavior is verified on iPad.

Written by the indexing model from the issue text.

Description

needs more info
Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Open the T3 Code web client in a browser tab on an iPad.
  2. Tap the composer so the keyboard opens, then type / to open the slash menu.
  3. Drag up or down on the page outside the composer.
Expected behavior

The slash menu stays attached to the top of the composer.

Actual behavior

The page moves but the slash menu does not move with the composer. It drifts away from the composer while dragging.

The menu is portaled to body as position: fixed. Its position comes from the composer's getBoundingClientRect() (apps/web/src/components/chat/ComposerCommandMenuLayer.tsx) and only updates on window resize/scroll. With the keyboard open, iPadOS pans the visual viewport, and that panning fires on visualViewport, which the layer does not listen to. The composer moves with the page while the menu keeps its old coordinates.

Pinning the shell to the visual viewport, as #19513 does on phones, would remove most of the panning. The layer still needs to update on visualViewport resize and scroll.

Impact

Minor bug or occasional failure

Version or commit

main at bb4afa542

Environment

iPad, web client in a browser tab. iPadOS and browser versions were not recorded.

Logs or stack traces

None.

Workaround

None found.

[!Note]
Responses generated with Claude (model: Claude Opus 5.5)

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
20h 2m
Merged PRs (30d)
164

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.