From cc2f6e3b7b8d720a8e0fb2732751e34b7f41c2e9 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 22 May 2023 15:40:10 +0300 Subject: [PATCH] fix error in dragdrop logic --- javascript/dragdrop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/dragdrop.js b/javascript/dragdrop.js index aa79871ab..5803daea5 100644 --- a/javascript/dragdrop.js +++ b/javascript/dragdrop.js @@ -57,8 +57,8 @@ function eventHasFiles(e) { } function dragDropTargetIsPrompt(target) { - if (!(target?.placeholder?.indexOf("Prompt") >= 0)) return true; - if (target?.parentNode?.parentNode) return true; + if (target?.placeholder && target?.placeholder.indexOf("Prompt") >= 0) return true; + if (target?.parentNode?.parentNode?.className?.indexOf("prompt") > 0) return true; return false; }