Skip to content

Commit

Permalink
Administration: Remove invalid attribute maxlength on number input.
Browse files Browse the repository at this point in the history
Remove the `maxlength` attribute on screen options number of items per page input. Previously kept due to input inconsistencies in IE 11 and Edge, this invalid usage is no longer needed. IE 11 is no longer supported, and Edge now behaves according to specifications.

Props Arena94, afercia, joedolson.
Fixes #40610.

git-svn-id: https://develop.svn.wordpress.org/trunk@57272 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joedolson committed Jan 11, 2024
1 parent 0bea937 commit efc2d9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ public function render_per_page_options() {
<?php if ( $per_page_label ) : ?>
<label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label>
<input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]"
id="<?php echo esc_attr( $option ); ?>" maxlength="3"
id="<?php echo esc_attr( $option ); ?>"
value="<?php echo esc_attr( $per_page ); ?>" />
<?php endif; ?>
<input type="hidden" name="wp_screen_options[option]" value="<?php echo esc_attr( $option ); ?>" />
Expand Down

0 comments on commit efc2d9e

Please sign in to comment.