microsoft / microsoft/vscode

Markdown file drag opens file instead of inserting link, regardless of Shift

Open
#336,763 1 comment 0 reactions 1 assignee Claimed by @meganrogge View on GitHub
new release
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Not yet tested. The Markdown Language Features extension is built in and enabled.

- VS Code Version: 1.138.0
Commit: 7debcd0e2acdea1c52de81bf9ee1620444407dda
Date: 2026-09-15T07:24:32Z
Electron: 42.10.0
Chromium: 148.0.7778.280
- OS Version: Fedora Linux 44 x64, kernel 7.2.4-200.fc44.x86_64

**Steps to Reproduce:**

1. Open a folder workspace containing Markdown files and subfolders.
2. Open a Markdown file in the source editor.
3. Configure:

```json
{
"editor.dropIntoEditor.enabled": true,
"editor.dropIntoEditor.showDropSelector": "afterDrop",
"markdown.editor.drop.enabled": "always"
}
```

4. Drag a workspace folder from Explorer into the Markdown source editor.

A relative Markdown link to the folder is inserted.

5. Drag a workspace `.md` file from Explorer into the same editor.
6. Repeat step 5 while holding Shift throughout the drag and drop.

**Expected:**

Dragging a workspace `.md` file into a Markdown source editor should insert a relative Markdown link. The documented Shift-drop behavior should work, and `"always"` should select Markdown-link insertion.

**Actual:**

A workspace `.md` file always opens in the editor instead of inserting a Markdown link. Holding Shift makes no difference.

Notes:

- Workspace folders insert Markdown links correctly by drag-and-drop.
- Built-in `Markdown Language Features` (`vscode.markdown-language-features`) is enabled.
- The drop target is the Markdown source editor text area, not Preview, an editor tab, or an editor-group overlay.
- `Markdown: Insert Link to File in Workspace` works, but is a separate manual workflow.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with the listed editor.dropIntoEditor and markdown.editor.drop.enabled settings, comparing workspace-folder and .md-file drops in the Markdown source editor. Read the built-in Markdown Language Features extension and its drag-and-drop handling; done means a workspace .md file inserts a relative Markdown link and documented Shift-drop behavior works.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.