WordPress.org

Make WordPress Core

#49312 closed defect (bug) (invalid)

jQuery UI and dependencies

Reported by: Seldimi Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: External Libraries Keywords:
Focuses: ui, javascript, performance Cc:

Description

Hello. I have noticed that if someone enqueues jquery-ui-autocomplete, it doesn't only load jquery-ui-core but all the jquery-ui components (like widget, datepicker, slider, even polyfill) (bringing extra JS load)

Is this normal? It should only enqueue the necessary scripts.

Change History (2)

#1 @SergeyBiryukov
10 months ago

  • Summary changed from jQuery UI and dependances to jQuery UI and dependencies

#2 @desrosj
10 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from 5.3.2 to 3.5

Hi @Seldimi,

Thanks for this ticket and welcome to Trac!

This appears to be the correct behavior. The jquery-ui-autocomplete component requires the jquery-ui-menu component, which equires the jquery-ui-widget and jquery-ui-position components. All of them, of course, require the jquery-ui-core file.

This can be confirmed by going to the jQuery UI Download Builder page and checking the Autocomplete component.

Unfortunately, there are no loading improvements that can be made here.

Note: See TracTickets for help on using tickets.