From a9d0df0b509d99622bc2ed7bbf332488ef03e732 Mon Sep 17 00:00:00 2001 From: Lukas Parsons Date: Tue, 7 Jul 2026 13:31:40 -0400 Subject: [PATCH] fix: remove 'Preview is read-only' click hint toast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _handleMarkdownPreviewClickHint() now no-ops. The toast appeared after 3 rapid clicks in the markdown preview and told the user to click Write to edit — annoying for users who click-drag to highlight while reading. Users self-hosting Odysseus know how preview/write modes work. --- static/js/document.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/static/js/document.js b/static/js/document.js index f9ebee9e..6d58ba7e 100644 --- a/static/js/document.js +++ b/static/js/document.js @@ -10008,24 +10008,7 @@ import { bindMenuDismiss, dismissOrRemove } from './escMenuStack.js'; } function _handleMarkdownPreviewClickHint() { - if (!_isMarkdownPreviewVisible()) return; - const lang = ((docs.get(activeDocId)?.language) || document.getElementById('doc-language-select')?.value || '').toLowerCase(); - if (lang !== 'markdown') return; - - const now = Date.now(); - _mdPreviewClickTimes = _mdPreviewClickTimes.filter(ts => now - ts < 2500); - _mdPreviewClickTimes.push(now); - if (_mdPreviewClickTimes.length < 3 || now - _mdPreviewHintLastAt < 5000) return; - - _mdPreviewHintLastAt = now; - _mdPreviewClickTimes = []; - if (uiModule?.showToast) { - uiModule.showToast('Preview is read-only. Click Write to edit the document.', { - duration: 5000, - action: 'Write', - onAction: () => _setMarkdownPreviewActive(false, { remember: true }), - }); - } + // Intentionally removed — click-to-highlight while reading is normal behavior } function _refreshMarkdownPreviewIfVisible(docId, content) {