WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 6 weeks ago

#48030 new defect (bug)

HTML5 input types are not being reset when submitting the addtag form

Reported by: stevegrunwell Owned by:
Milestone: 6.0 Priority: normal
Severity: minor Version:
Component: Taxonomy Keywords: has-patch needs-testing
Focuses: ui, javascript, administration Cc:

Description (last modified by sabernhardt)

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.

Attachments (2)

48030.patch (522 bytes) - added by stevegrunwell 2 years ago.
48030.2.patch (565 bytes) - added by stevegrunwell 2 years ago.
Updated version that excludes radio buttons and checkboxes.

Download all attachments as: .zip

Change History (5)

@stevegrunwell
2 years ago

@stevegrunwell
2 years ago

Updated version that excludes radio buttons and checkboxes.

#1 @valentinbora
2 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release

#2 @sabernhardt
11 months ago

  • Description modified (diff)
  • Keywords needs-testing added

#3 @sabernhardt
6 weeks ago

  • Component changed from Administration to Taxonomy
  • Milestone changed from Future Release to 6.0
Note: See TracTickets for help on using tickets.