Administration: Remove invalid attribute maxlength on number input.

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
This commit is contained in:
Joe Dolson 2024-01-11 17:43:00 +00:00
parent 0bea937295
commit efc2d9ed7c

View File

@ -1279,7 +1279,7 @@ final class WP_Screen {
<?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 ); ?>" />