Make WordPress Core

Opened 7 weeks ago

Last modified 4 weeks ago

#64956 new defect (bug)

Unnecessary horizontal scrollbar on theme-editor.php in WordPress 7.0 RC1

Reported by: hardik2812's profile hardik2812 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-test-info has-patch
Focuses: ui, css, administration Cc:

Description

On the theme editor page (theme-editor.php) in the WordPress admin dashboard, a horizontal scrollbar is visible even when there is no content overflowing the container.

Steps to reproduce:

Install WordPress 7.0 RC1
Go to Admin Dashboard
Navigate to Appearance → Theme File Editor
Observe the horizontal scrollbar at the bottom

Expected result:
No horizontal scrollbar should appear when content fits within the viewport.

Actual result:
A horizontal scrollbar is displayed unnecessarily, even when there is no overflow content.

Suggested Fix Idea
#templateside>ul {
overflow-x: hidden;
}

Attachments (3)

Screen Recording 2026-03-26 at 4.08.30 PM.mov (611.7 KB) - added by hardik2812 7 weeks ago.
Reproduceable Issue on mobile - Ticket #64956.mp4 (835.1 KB) - added by torontodigits 6 weeks ago.
Reproduceable Issue on mobile - Ticket #64956
Reproduceable Issue - Ticket #64956.png (109.6 KB) - added by torontodigits 6 weeks ago.
Reproduceable Issue on large screens - Ticket #64956

Download all attachments as: .zip

Change History (12)

#1 @audrasjb
7 weeks ago

  • Severity changed from critical to normal

Thanks for the ticket.
I wasn't able to reproduce the issue on my side in WP 7.0 RC1 (using Chrome on an MBpro). Do you have a very large (or small) screen? A specific configuration? What is you OS/browser?

Obviously moving the severity to normal ;)

#2 @hardik2812
7 weeks ago

Hello @audrasjb ,

I have checked in Chrome on a MacBook, and below max-width: 782px.

Thanks

#3 @desrosj
7 weeks ago

  • Version set to trunk

Setting to trunk until it can be reproduced in an earlier version in case it is related to the admin changes in 7.0.

#5 @wildworks
7 weeks ago

I tested this issue in the playground. It's a problem that has been occurring since at least version 6.3, and possibly earlier.

#6 @audrasjb
7 weeks ago

  • Version trunk deleted

#7 @torontodigits
6 weeks ago

  • Keywords has-test-info needs-patch added; needs-testing removed

Got a chance to test this via PlayGround by installing frresh WordPress RC2 & can see this issue on mobile & can replicate it on very large screens by Zooming it to 200%.

@torontodigits
6 weeks ago

Reproduceable Issue on mobile - Ticket #64956

@torontodigits
6 weeks ago

Reproduceable Issue on large screens - Ticket #64956

This ticket was mentioned in PR #11588 on WordPress/wordpress-develop by @hbhalodia.


4 weeks ago
#8

  • Keywords has-patch added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/64956

## Use of AI Tools

  • None
  • Asked claude to review and provide a solution, but was not able to. Kept on searching and searching and hallucinated itself.

---
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

## Screencast

https://app.godam.io/web/video/015u0a9adt

#9 @nikunj8866
4 weeks ago

Test Report

Description

✅ This report validates that the patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/11588

Environment

  • WordPress: 7.1-alpha-20260416.100837
  • PHP: 7.4.33
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 146.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps to Test

  1. Apply the patch from the linked pull request to a WordPress installation.
  2. Navigate to Tools > Theme File Editor (theme-editor.php).
  3. Resize the browser window to a small viewport width (e.g., below 768px or mobile-sized).
  4. Observe whether a horizontal scrollbar appears on the Theme Files section.
  5. Navigate to Tools > Plugin File Editor (plugin-editor.php).
  6. Again, resize the browser window to a small viewport width.
  7. Observe whether a horizontal scrollbar appears on the Plugin Files section.

Actual Results

  1. ✅ Issue resolved with patch.
  2. Unnecessary horizontal scrollbar on theme-editor.php is resolved with the patch — no horizontal scroll at small widths.
  3. Unnecessary horizontal scrollbar on plugin-editor.php is also resolved — no horizontal scroll at small widths.
  4. ✅ Patch also tested on WordPress 6.3 — working as expected with no regressions.

Supplemental Artifacts

https://www.awesomescreenshot.com/video/51596248?key=ffed62429a24e4a0d7a07e4fa4de3983

Note: See TracTickets for help on using tickets.