From 8d6a656a88f0590720d3703cf19347fe26b2c2e2 Mon Sep 17 00:00:00 2001 From: Tim Kaye Date: Mon, 9 Oct 2023 17:32:14 -0400 Subject: [PATCH] Update widgets.js to address error message in console --- src/wp-admin/js/widgets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/js/widgets.js b/src/wp-admin/js/widgets.js index 2a8a70a235..3795b30e13 100644 --- a/src/wp-admin/js/widgets.js +++ b/src/wp-admin/js/widgets.js @@ -213,11 +213,11 @@ window.wpWidgets = { * * @param {Object} event jQuery event object. */ - out: function() { + out: function( event ) { setTimeout( function() { - var sidebar = this.querySelector( 'ul' ); + var sidebar = event.target.querySelector( 'ul' ); if ( ! sidebar.classList.contains( 'ui-droppable-hover' ) ) { - this.querySelector( 'details' ).removeAttribute( 'open' ); + event.target.querySelector( 'details' ).removeAttribute( 'open' ); } }, 0 ); }