From 97672a38429d940c6c236adca4262056cfb73bb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Apr 2026 10:37:53 +0000 Subject: [PATCH 1/2] Initial plan From a59cf5caa71d21a433ef4fa433d6ce855f551130 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Apr 2026 04:55:56 +0000 Subject: [PATCH 2/2] fix: prevent Ctrl+C from copying entire document when editor text is selected on Windows Agent-Logs-Url: https://github.com/ThisIs-Developer/Markdown-Viewer/sessions/8553a508-b532-417a-bf24-6cf69fbec85d Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com> --- desktop-app/resources/js/script.js | 7 ++++--- script.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/desktop-app/resources/js/script.js b/desktop-app/resources/js/script.js index ebafa41..476c336 100644 --- a/desktop-app/resources/js/script.js +++ b/desktop-app/resources/js/script.js @@ -1566,8 +1566,8 @@ This is a fully client-side application. Your content never leaves your browser if (mode === 'split') { // Restore preserved pane widths when entering split mode applyPaneWidths(); - } else if (previousMode === 'split') { - // Reset pane widths when leaving split mode + } else { + // Reset inline pane widths when not in split mode resetPaneWidths(); } @@ -2841,7 +2841,8 @@ This is a fully client-side application. Your content never leaves your browser const activeEl = document.activeElement; const isTextControl = activeEl && (activeEl.tagName === "TEXTAREA" || activeEl.tagName === "INPUT"); const hasSelection = window.getSelection && window.getSelection().toString().trim().length > 0; - if (!isTextControl && !hasSelection) { + const editorHasSelection = markdownEditor.selectionStart !== markdownEditor.selectionEnd; + if (!isTextControl && !hasSelection && !editorHasSelection) { e.preventDefault(); copyMarkdownButton.click(); } diff --git a/script.js b/script.js index c6370de..476c336 100644 --- a/script.js +++ b/script.js @@ -2841,7 +2841,8 @@ This is a fully client-side application. Your content never leaves your browser const activeEl = document.activeElement; const isTextControl = activeEl && (activeEl.tagName === "TEXTAREA" || activeEl.tagName === "INPUT"); const hasSelection = window.getSelection && window.getSelection().toString().trim().length > 0; - if (!isTextControl && !hasSelection) { + const editorHasSelection = markdownEditor.selectionStart !== markdownEditor.selectionEnd; + if (!isTextControl && !hasSelection && !editorHasSelection) { e.preventDefault(); copyMarkdownButton.click(); }