Skip to content

Commit 3a1b1ed

Browse files
Copilotjoaomoreno
andauthored
Disable double-click to reveal source for .copilotmd files in markdown preview (microsoft#267517)
* Initial plan * Disable double-click behavior for .copilotmd files in markdown preview Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com> * Update extensions/markdown-language-features/preview-src/index.ts --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com> Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
1 parent e39f48a commit 3a1b1ed

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • extensions/markdown-language-features/preview-src

extensions/markdown-language-features/preview-src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ document.addEventListener('dblclick', event => {
304304
return;
305305
}
306306

307+
// Disable double-click to switch editor for .copilotmd files
308+
if (documentResource.endsWith('.copilotmd')) {
309+
return;
310+
}
311+
307312
// Ignore clicks on links
308313
for (let node = event.target as HTMLElement; node; node = node.parentNode as HTMLElement) {
309314
if (node.tagName === 'A') {

0 commit comments

Comments
 (0)