openai / openai/codex

ChatGPT web: selecting all composer text can create horizontal page overflow

Open
#39,232 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug codex-web windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What issue are you seeing?

On chatgpt.com, selecting all text inside the prompt composer can cause the page to gain horizontal overflow/a horizontal scrollbar at the same moment the floating formatting toolbar appears.

The original reporter observed the issue repeatedly on Windows in desktop Chrome. A fresh controlled run reproduced the selection toolbar at a 500 × 720 CSS-pixel viewport, although that fresh session did not reproduce the document-width increase. This may therefore depend on UI state, rollout/build, or toolbar placement at the moment it opens.

Controlled browser capture

The GIF shows the exact trigger: focus the composer, then press Ctrl+A; the Bold, Italic, and Text styles toolbar appears.

Original reporter screenshot

The second attachment is the original capture of the affected state.

Image Image
What steps can reproduce the bug?
  1. Open https://chatgpt.com/ in desktop Chrome on Windows.
  2. Start a new chat.
  3. Type text into the prompt composer (example: refresh until its live).
  4. Keep focus in the composer and press Ctrl+A to select all composer text.
  5. The floating formatting toolbar appears above the selection.
  6. In the affected state, observe that the page becomes horizontally scrollable / shows a horizontal scrollbar.

Original report: reproducible when selecting all composer text.
Controlled rerun on 2026-08-18: toolbar reproduced, but horizontal overflow did not reproduce after a fresh page load.

What is the expected behavior?

Opening the selection-formatting toolbar should not change the document's scrollable width. The toolbar and any positioning/portal wrapper should remain constrained to the visual viewport at every supported breakpoint.

Additional information
Environment
  • Product surface: ChatGPT web (chatgpt.com)
  • OS: Windows
  • Browser: Google Chrome 151.0.7922.138
  • Controlled viewport: 500 × 720 CSS pixels
  • Date tested: 2026-08-18
Read-only DOM evidence after Ctrl+A

The selection UI is exposed as an ARIA toolbar:

- toolbar:
  - button "Bold"
  - button "Italic"
  - button "Text styles":
    - generic: Text

Measured toolbar geometry in the controlled run:

{
  "role": "toolbar",
  "left": 31,
  "right": 196.88,
  "width": 165.88,
  "height": 36,
  "position": "static",
  "overflowX": "hidden"
}

Document metrics in that fresh controlled run:

{
  "before": {
    "documentElement.clientWidth": 500,
    "documentElement.scrollWidth": 500,
    "body.scrollWidth": 500
  },
  "after": {
    "documentElement.clientWidth": 500,
    "documentElement.scrollWidth": 500,
    "body.scrollWidth": 500,
    "hasHorizontalOverflow": false
  }
}

The DOM evidence confirms that the toolbar is created by the selection action, but it does not establish that the toolbar itself is the overflowing layout box in the affected session. A transient placement wrapper/portal, a rollout-specific implementation, or another sibling may be contributing to scroll width. That is an inference, not a confirmed root cause.

Contributor guide

Open the contributing guide

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.

Research direction

No repository file, test, or entry point is identified. Reproduce the Ctrl+A selection flow on chatgpt.com at the reported viewport, then inspect the selection toolbar and document scroll widths across affected and unaffected sessions; done means the toolbar appears without increasing horizontal overflow.

Written by the indexing model from the issue text.

Assessment

Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.