fix: remove 'Preview is read-only' click hint toast
Some checks are pending
ci / docker publish / build (amd64) (push) Waiting to run
ci / docker publish / build (arm64) (push) Waiting to run
ci / docker publish / merge manifest + tag (push) Blocked by required conditions

_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.
This commit is contained in:
Lukas Parsons 2026-07-07 13:31:40 -04:00
parent 88e15987d2
commit a9d0df0b50

View file

@ -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) {