[wp-trac] [WordPress Trac] #48030: HTML5 input types are not being reset when submitting the addtag form
WordPress Trac
noreply at wordpress.org
Tue Feb 23 12:41:30 UTC 2021
#48030: HTML5 input types are not being reset when submitting the addtag form
-----------------------------+---------------------------------------------
Reporter: stevegrunwell | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version:
Severity: minor | Resolution:
Keywords: has-patch | Focuses: ui, javascript, administration
needs-testing |
-----------------------------+---------------------------------------------
Changes (by sabernhardt):
* keywords: has-patch => has-patch needs-testing
Old description:
> The `addtag` form on wp-admin/edit-tags.php` automatically clears the new
> term's name, slug, and description field but will *not* clear any visible
> inputs beyond `input[type="text"]` and `textarea`.
>
> The offending bit of code is in `js/_enqueues/admin/tags.js`:
>
> {{{ $('input[type="text"]:visible, textarea:visible', form).val(''); }}}
>
> If we broaden the scope a bit, we can hit all visible inputs but still
> exclude checkboxes + radios.
New description:
The `addtag` form on `wp-admin/edit-tags.php` automatically clears the new
term's name, slug, and description field but will *not* clear any visible
inputs beyond `input[type="text"]` and `textarea`.
The offending bit of code is in `js/_enqueues/admin/tags.js`:
{{{ $('input[type="text"]:visible, textarea:visible', form).val(''); }}}
If we broaden the scope a bit, we can hit all visible inputs but still
exclude checkboxes + radios.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48030#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list