Skip to content

Commit 14871a6

Browse files
committed
fix: consistent attribute checking
1 parent bd5f11d commit 14871a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/admin/js/media-manager/drop-zone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function addDropZoneListenerToMediaManager( targetDocument ) {
155155
// inside the DropZoneComponent.
156156
//
157157
// @see https://github.com/WordPress/gutenberg/blob/f8140c4fcc8db2d6078ad76fd433c79df3543860/packages/components/src/drop-zone/index.tsx#L59
158-
if ( target?.classList.contains( 'components-drop-zone' ) || target?.hasAttribute( 'data-is-drop-zone' ) || target?.classList.contains( 'uploader-editor-content' ) ) {
158+
if ( target?.classList.contains( 'components-drop-zone' ) || target?.getAttribute( 'data-is-drop-zone' ) === 'true' || target?.classList.contains( 'uploader-editor-content' ) ) {
159159
// Create a drop event with conditional bubbling
160160
// Use bubbles: false when in iframe to prevent doubling, but true for main document
161161
const isInIframe = targetDocument !== document

0 commit comments

Comments
 (0)