WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#15258 closed defect (bug) (duplicate)

Category widget breaks when multiple widgets with dropdowns displayed on page

Reported by: froman118 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Widgets Keywords: category, dropdown, widget
Focuses: Cc:

Description

When using multiple Category widgets to display dropdowns each instance is given the same ID on the <select> and the emitted JavaScript is exactly the same. To get this working correctly the dropdown's ID and the JavaScript variable and function names need to be unique. This can be accomplished by using the widget ID to create a unique identifier for each widget. Patch is attached.

Attachments (1)

multiple-category-dropdowns.patch (1.4 KB) - added by froman118 4 years ago.
patch to add unique identifier for dropdowns on Category widget

Download all attachments as: .zip

Change History (2)

@froman1184 years ago

patch to add unique identifier for dropdowns on Category widget

comment:1 @nacin4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #13019. I've suggested there how I think it should be done.

Note: See TracTickets for help on using tickets.