You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to disable the context menu on img tag?
For example inside a component that has a custom context menu there is some img tags that we want the default browser context menu.
The text was updated successfully, but these errors were encountered:
JoeGaffney
changed the title
Is there a way to disable the custom the context menu for a tag
Is there a way to disable the custom context menu for a tag
Nov 7, 2023
Found out how you can do it on the showMenu function if anyone stumbles upon this query
function showMenu(e) {
// Prevent the context menu from appearing for certain elements
if (e.target.tagName === "IMG" || e.target.tagName === "VIDEO" || e.target.tagName === "A") {
return;
} else {
e.stopPropagation();
show({
event: e,
props: {},
id: GetMenuId(),
});
}
}
Is there a way to disable the context menu on img tag?
For example inside a component that has a custom context menu there is some img tags that we want the default browser context menu.
The text was updated successfully, but these errors were encountered: