fix: remove 'Preview is read-only' click hint toast
_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:
parent
88e15987d2
commit
a9d0df0b50
1 changed files with 1 additions and 18 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue