Administration: Revert the change to click event handler for fly-out submenus.

The `click()` method there is not the jQuery method, but is an HTML DOM method instead.

This makes the fly-out submenu header clickable again when the menu is folded.

Follow-up to [50420].

Props peterwilsoncc, SergeyBiryukov.
Merges [50429] to the 5.7 branch.
Fixes #52638. See #51812.


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50437 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2021-02-25 22:50:47 +00:00
parent e66199a1e8
commit 4639c48bd8

View File

@ -840,7 +840,7 @@ $document.ready( function() {
* @return {void}
*/
$adminmenu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){
$(e.target).parent().siblings('a').get(0).trigger( 'click' );
$(e.target).parent().siblings('a').get(0).click();
});
/**