Skip to content

Commit

Permalink
feat: now when file tab dropped in any input or editor then it insert…
Browse files Browse the repository at this point in the history
…s path
  • Loading branch information
bajrangCoder committed Oct 23, 2024
1 parent c8ae720 commit 9367824
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/handlers/editorFileTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,21 @@ function releaseDrag(e) {
}
updateFileList($parent);
}
} else if (
$target.tagName === "INPUT" ||
$target.tagName === "TEXTAREA" ||
$target.classList.contains("ace_text-input") ||
$target.closest(".ace_editor")
) {
// If released on an input area or ace editor
const filePath = editorManager.activeFile.uri;
if (filePath) {
if ($target.closest(".ace_editor")) {
editorManager.editor.insert(filePath);
} else {
$target.value += filePath;
}
}
}

cancelAnimationFrame(animationFrame);
Expand Down

0 comments on commit 9367824

Please sign in to comment.