fix: allow returning from resource tabs
This commit is contained in:
@@ -7486,17 +7486,16 @@ const SIDEBAR_TREE_JS: &str = r##"
|
||||
openEditorAttachmentLink(editorAttachmentLink);
|
||||
}
|
||||
|
||||
window.addEventListener('mousedown', interceptEditorAttachmentLink, true);
|
||||
window.addEventListener('click', interceptEditorAttachmentLink, true);
|
||||
|
||||
document.addEventListener('click', function(e) {
|
||||
var editorAttachmentLink = closestAction(e.target, '.editor-surface .ProseMirror a[data-mnote-attachment-link="true"], .editor-surface .ProseMirror a.mnote-uploaded-attachment-row');
|
||||
function suppressEditorAttachmentLinkDefault(event) {
|
||||
var editorAttachmentLink = closestAction(event.target, '.editor-surface .ProseMirror a[data-mnote-attachment-link="true"], .editor-surface .ProseMirror a.mnote-uploaded-attachment-row');
|
||||
if (!(editorAttachmentLink instanceof HTMLAnchorElement)) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation();
|
||||
openEditorAttachmentLink(editorAttachmentLink);
|
||||
}, true);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (typeof event.stopImmediatePropagation === 'function') event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
window.addEventListener('mousedown', suppressEditorAttachmentLinkDefault, true);
|
||||
window.addEventListener('click', interceptEditorAttachmentLink, true);
|
||||
|
||||
document.addEventListener('mouseover', function(event) {
|
||||
var link = closestAction(event.target, '.editor-surface .ProseMirror a[data-mnote-attachment-link="true"], .editor-surface .ProseMirror a.mnote-uploaded-attachment-row');
|
||||
|
||||
Reference in New Issue
Block a user