fix: prevent default context menu behavior in VnTable component
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2025-05-19 12:45:40 +02:00
parent 5c482cf738
commit 66ab8b20ee
2 changed files with 2 additions and 5 deletions

View File

@ -18,7 +18,7 @@ const arrayData = defineModel({
function handler(event) {
const clickedElement = event.target.closest('td');
if (!clickedElement) return;
event.preventDefault();
target.value = event.target;
qmenuRef.value.show();
colField.value = clickedElement.getAttribute('data-col-field');

View File

@ -222,10 +222,7 @@ onBeforeMount(() => {
onMounted(async () => {
if ($props.isEditable) document.addEventListener('click', clickHandler);
document.addEventListener('contextmenu', (event) => {
event.preventDefault();
contextMenuRef.value.handler(event);
});
document.addEventListener('contextmenu', contextMenuRef.value.handler);
mode.value =
quasar.platform.is.mobile && !$props.disableOption?.card
? CARD_MODE