prevent calling contextmenu in embed page by stopping at the caller
This commit is contained in:
parent
1fff58455c
commit
e269dcb4a7
3 changed files with 6 additions and 4 deletions
|
|
@ -32,6 +32,8 @@ const props = withDefaults(defineProps<{
|
|||
|
||||
const behavior = props.behavior ?? inject<MkABehavior>('linkNavigationBehavior', null);
|
||||
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
const el = shallowRef<HTMLElement>();
|
||||
|
||||
defineExpose({ $el: el });
|
||||
|
|
@ -49,6 +51,8 @@ const active = computed(() => {
|
|||
});
|
||||
|
||||
function onContextmenu(ev) {
|
||||
if (inEmbedPage) return;
|
||||
|
||||
const selection = window.getSelection();
|
||||
if (selection && selection.toString() !== '') return;
|
||||
os.contextMenu([{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue