Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#49312 closed defect (bug) (invalid)

jQuery UI and dependencies

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

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
7 years ago

  • Summary jQuery UI and dependances → jQuery UI and dependencies

#2 @desrosj
7 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → closed
  • Version 5.3.2 → 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.