WordPress.org

Make WordPress Core

Opened 3 hours ago

Last modified 74 minutes ago

#48568 new defect (bug)

$ not defined on edit screen anymore

Reported by: david.binda Owned by:
Milestone: 5.3.1 Priority: normal
Severity: normal Version: trunk
Component: Script Loader Keywords:
Focuses: Cc:
PR Number:

Description

While the no-conflict mode of jQuery has been a standard for a while already, the mediaelement script has been leaking jQuery to $ variable, so prior 5.3, the plugin authors (eg.: for tinyMCE plugins) were able to use $ w/o penalties.

However, with the upgrade of mediaelement, this has changed, and jQuery is no longer available via $ in window.

How to test:

In 5.2: open a new post screen and type $ in console. It should be defined. In 5.3 it is not.

It's likely due to the change in https://build.trac.wordpress.org/changeset/46234/trunk/wp-includes/js/mediaelement/mediaelement-and-player.js at line 5778.

Change History (3)

#1 @SergeyBiryukov
3 hours ago

  • Component changed from General to Script Loader
  • Milestone changed from Awaiting Review to 5.3.1
  • Summary changed from $ not defied on edit screen anymore to $ not defined on edit screen anymore

#2 @johnbillion
2 hours ago

When was this leak from mediaelement first introduced?

#3 @david.binda
74 minutes ago

When was this leak from mediaelement first introduced?

Looks like it has been 2 years ago, in https://build.trac.wordpress.org/changeset/41038

Note: See TracTickets for help on using tickets.