1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-28 06:48:36 +09:00
This commit is contained in:
NoriDev 2024-06-12 11:15:50 +09:00
parent 3b97e9bc98
commit da5d52be20
4 changed files with 7 additions and 7 deletions

View File

@ -443,12 +443,12 @@ if (!props.mock) {
}
function noteClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
else router.push(notePage(appearNote.value));
}
function noteDblClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
else router.push(notePage(appearNote.value));
}

View File

@ -57,12 +57,12 @@ onMounted(() => {
});
function noteClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
else router.push(notePage(props.note));
}
function noteDblClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
else router.push(notePage(props.note));
}
</script>

View File

@ -88,12 +88,12 @@ if (props.detail) {
}
function noteClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'doubleClick') ev.stopPropagation();
else router.push(notePage(props.note));
}
function noteDblClick(ev: MouseEvent) {
if (!expandOnNoteClick || window.getSelection().toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
if (!expandOnNoteClick || window.getSelection()?.toString() !== '' || defaultStore.state.expandOnNoteClickBehavior === 'click') ev.stopPropagation();
else router.push(notePage(props.note));
}
</script>

View File

@ -112,7 +112,7 @@ function onContextmenu(ev: MouseEvent) {
};
if (isLink(ev.target)) return;
if (['INPUT', 'TEXTAREA', 'IMG', 'VIDEO', 'CANVAS'].includes(ev.target.tagName) || ev.target.attributes['contenteditable']) return;
if (window.getSelection().toString() !== '') return;
if (window.getSelection()?.toString() !== '') return;
const path = mainRouter.getCurrentPath();
os.contextMenu([{
type: 'label',