function rightClickElementById(id) {
const element = document.getElementById(id);
if (!element) {
console.error("Element not found:", id);
return;
}

const event = new MouseEvent("contextmenu", {
bubbles: true,
cancelable: true,
view: window,
button: 2, // Chuột phải
buttons: 2,
clientX: element.getBoundingClientRect().left,
clientY: element.getBoundingClientRect().top
});

element.dispatchEvent(event);
}
