Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

#65104 closed defect (bug) (fixed)

Screen Options "Number of items per page" input clips last digit for 3-digit values

Reported by: shatrumyatra's profile shatrumyatra Owned by: audrasjb's profile audrasjb
Milestone: 7.0 Priority: normal
Severity: normal Version: trunk
Component: Administration Keywords: has-screenshots has-patch dev-reviewed
Focuses: ui Cc:

Description

In the WordPress admin area, under Screen Options, the Number of items per page field appears too narrow. When entering a 3-digit value such as 999, the last digit is visually cut off / clipped inside the input box.

Steps to Reproduce:

  1. Go to any admin screen that supports Screen Options (for example Posts, Pages, Users, Plugins, etc.).
  2. Open Screen Options.
  3. In Number of items per page, enter a 3-digit number such as 999.
  4. Observe the input field display.

Expected Result:

The full value (999) should be clearly visible inside the input field.

Actual Result:

The last digit is clipped or partially hidden, making the value hard to read.

Attachments (8)

screen-option.png (141.4 KB) - added by shatrumyatra 4 weeks ago.
Screenshot 2026-04-21 at 5.46.03 PM.png (156.0 KB) - added by ekla 4 weeks ago.
Chrome Screen Options Screenshot.png (49.6 KB) - added by ekla 4 weeks ago.
Screenshot 2026-04-21 175826.png (42.5 KB) - added by khushdoms 4 weeks ago.
screenshot1
patch-65104.diff (371 bytes) - added by shatrumyatra 4 weeks ago.
Created patch
patch-65105.diff (1.2 KB) - added by shatrumyatra 3 weeks ago.
Updated patch. Added small-text class in Screen option Number of items per page: input.
before-patch.png (22.6 KB) - added by shailu25 3 weeks ago.
Before Patch
after-patch.png (18.0 KB) - added by shailu25 3 weeks ago.
After Patch

Download all attachments as: .zip

Change History (29)

#1 @khushdoms
4 weeks ago

Hi, I'd like to work on this ticket. I will investigate and propose a patch.

#2 @ekla
4 weeks ago

Tested this on:

  • WordPress version: 6.9
  • PHP version: 8.2.4 (XAMPP)
  • Browser: Brave
  • Browser: Chrome

Steps followed:

  1. Open the Plugins
  2. Clicked Screen Options
  3. Entered 999 in Number of items per page field.

Result:
Could not reproduce the issue. Everything works as expected.

Can you please confirm:

  • If any plugins are active?
  • If this happens on a default theme?

@khushdoms
4 weeks ago

screenshot1

#3 follow-up: @khushdoms
4 weeks ago

Tested this issue in my local environment and was not able to reproduce the problem.

Environment

  • WordPress: 6.9.4
  • PHP: 8.2.27
  • Server: nginx/1.26.1
  • Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.2.27)
  • Browser: Chrome 147.0.0.0
  • OS: Windows 10/11
  • Theme: Divi 5.0.0-public-alpha.5
  • MU Plugins: None
  • Plugins:
    • Test Reports 1.2.1
    • WooCommerce 10.7.0

Steps followed:

  1. Opened Posts screen
  2. Opened Screen Options
  3. Entered values like 999 and 1000 in "Number of items per page"

Result:

  • All digits are fully visible inside the input field
  • No clipping or truncation observed

Additional notes:
Tested with both 3-digit and 4-digit values, and the input field adjusted correctly.

It appears the issue is not reproducible in this environment. This might be browser-specific, zoom-level related, or dependent on a different setup.

screenshot1

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


4 weeks ago
#4

  • Keywords has-patch added

@shatrumyatra
4 weeks ago

Created patch

#5 in reply to: ↑ 3 @shatrumyatra
4 weeks ago

Replying to khushdoms:

I tested in below environment.

Environment

WordPress: 7.0-beta6
PHP : 8.2.26
Browser : Mozilla Firefox
OS : MacOS

#6 @sabernhardt
4 weeks ago

  • Milestone changed from Awaiting Review to 7.0
  • Version set to trunk

#64547 increased the padding to 12 pixels (from 8 pixels on larger screens and 10 pixels on narrower screens).

PR 11619 and patch-65104.diff reduce the left padding back to 8 pixels, at any screen size.

Additional options:

  1. Increase the 4em width to 5em, without reducing the padding. The field would appear below the label on narrow screens more often, but not too often.
  2. Add the small-text class in the HTML for consistency with other small input fields. Then .screen-per-page would not require its own width rule (or padding rules).

I'm setting the milestone to 7.0, but 7.0.1 could fit too.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


3 weeks ago

#8 @audrasjb
3 weeks ago

  • Keywords needs-patch added; has-patch removed
  • Owner set to audrasjb
  • Status changed from new to accepted

As per today's bug scrub: To be consistent, I tend to prefer the approach suggested by @sabernhardt: add the small-text class to this input field. An alternative PR with this approach would be very welcome.

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


3 weeks ago
#9

  • Keywords has-patch added; needs-patch removed

@shatrumyatra
3 weeks ago

Updated patch. Added small-text class in Screen option Number of items per page: input.

#10 @gaurangsondagar
3 weeks ago

Patch Testing Report

Patch Tested: https://core.trac.wordpress.org/attachment/ticket/65104/patch-65105.diff

Environment:

  • WordPress: 7.0-RC2-62242
  • PHP: 8.2.29
  • Server: Apache
  • Database: MySQL
  • Browser: Chrome 146.0.7680.164
  • OS: Ubuntu 22.04.5 LTS

Steps performed:

  • Navigated to the Posts screen
  • Accessed the Screen Options panel
  • Set the Number of items per page to values as 999

Result:
I was unable to reproduce the issue, and everything appears to be functioning as expected.

Please review attached screenshots as a reference:
https://snipboard.io/XKfgsP.jpg
https://snipboard.io/DuzymO.jpg

#11 @jigarkahar
3 weeks ago

Test Report

Description

✅ This report validates that the indicated patch works as expected.

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

Environment

  • WordPress: 7.0-RC2
  • PHP: 8.3.30
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 147.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 Reproduce

  1. Go to any admin screen that supports Screen Options (for example Posts, Pages, Users, Plugins, etc.).
  2. Open Screen Options.
  3. In Number of items per page, enter a 4-digit number such as 1000.
  4. Observe the input field display.

Actual Results

  1. ✅ Issue resolved with patch.
  2. The entered value is clearly visible in the input field.
  3. I also tested with a 5-digit value such as 10000, and it remained clearly visible without clipping.

Supplemental Artifacts

Before: https://prnt.sc/3jUW29jEl5Qi
After: https://prnt.sc/PFkDWhzCDq6W

This ticket was mentioned in Slack in #core by juanmaguitar. View the logs.


3 weeks ago

#13 @juanmaguitar
3 weeks ago

As per today's bug scrub

There was a suggestion by @audrasjb that has been added to the patch.
There is a Patch Testing Report that verifies the path so I would say the ticket is ready to be merged.

Last edited 3 weeks ago by juanmaguitar (previous) (diff)

#14 @shailu25
3 weeks ago

Test Report

This Report Validates that the indicated patch address the issue.✅

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11626

Environment:

WordPress - 7.1-alpha-20260423.153912
OS - Windows
Browser - Chrome
Theme: Twenty Twenty Five
PHP - 8.2
Plugin - None

Actual Results:

  • Issue Resolved with Patch ✅

Supplemental Artifacts

  • Attached

@shailu25
3 weeks ago

Before Patch

@shailu25
3 weeks ago

After Patch

#15 @darshitrajyaguru97
3 weeks ago

Test Report

This report validates that the proposed patch successfully addresses the reported issue. ✅

Patch Tested

https://github.com/WordPress/wordpress-develop/pull/11626

Environment

  • WordPress: 7.1-alpha-20260423.153912
  • OS: Windows
  • Browser: Chrome
  • Theme: Twenty Twenty-Five
  • PHP: 8.2.29
  • Plugins: None

Steps to Test

  1. Set up a clean WordPress installation with the above environment.
  2. Reproduce the issue on the unpatched version.
  3. Apply the patch from the PR.
  4. Re-test the same scenario.

Actual Results

  • The issue is no longer reproducible after applying the patch.
  • No warnings, errors, or regressions observed.

Expected Results

  • The patch should resolve the issue without introducing new errors. ✅

Conclusion

The patch works as expected and successfully resolves the issue. ✅

Supplemental Artifacts

  • Attached screenshots

Before: https://prnt.sc/0hvbMcbMPCEM
After: https://prnt.sc/JDCVZe_NRqvB

#16 @yusufmudagal
3 weeks ago

## Test Report

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

Environment:
WordPress: trunk
PHP: 8.x
Browser: Chrome
OS: macOS

Steps tested:

  1. Reproduced the issue before applying the patch.
  2. Confirmed that the per-page input clipped larger values such as 1000.
  3. Applied the GitHub PR patch successfully using: npm run grunt patch:https://github.com/WordPress/wordpress-develop/pull/11626
  4. Verified the change in: src/wp-admin/includes/class-wp-screen.php
  5. Re-tested Screen Options on Posts, Pages, Users, Plugins, and Comments.
  6. Tested values: 99, 999, 1000, and 10000.

Result:
Before the patch, larger values were clipped inside the input field.
After applying the patch, the full values are visible correctly.
No UI issues observed.

Conclusion:
Patch works as expected.

#17 @peterwilsoncc
3 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 62268:

Administration: Widen screen options number of items field.

Modifies the Screen Options > Number of items per page field to avoid cropping of three digit numbers when setting a list view to display a lot of items.

Props apermo, audrasjb, darshitrajyaguru97, ekla, gaurangsondagar, jigarkahar, juanmaguitar, khushdoms, peterwilsoncc, sabernhardt, shailu25, shatrumyatra, yusufmudagal.
Fixes #65104.

#18 @peterwilsoncc
3 weeks ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merging r62268 to the 7.0 branch pending another committers sign-off.

#20 @audrasjb
3 weeks ago

  • Keywords dev-reviewed added; dev-feedback removed

This is a second committer sign off. Let's get this fix backported to branch 7.0.

#21 @peterwilsoncc
3 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 62269:

Administration: Widen screen options number of items field.

Modifies the Screen Options > Number of items per page field to avoid cropping of three digit numbers when setting a list view to display a lot of items.

Reviewed by audrasjb.
Merges r62268 to the 7.0 branch.

Props apermo, audrasjb, darshitrajyaguru97, ekla, gaurangsondagar, jigarkahar, juanmaguitar, khushdoms, peterwilsoncc, sabernhardt, shailu25, shatrumyatra, yusufmudagal.
Fixes #65104.

Note: See TracTickets for help on using tickets.