ImageZoom: Fix incorrectly adding context menu in some places (#3150)

This commit is contained in:
sadan4 2025-01-24 19:11:26 -05:00 committed by GitHub
parent 4036fbab92
commit e19937d437
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,7 +81,12 @@ export const settings = definePluginSettings({
}); });
const imageContextMenuPatch: NavContextMenuPatchCallback = children => { const imageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
// Discord re-uses the image context menu for links to for the copy and open buttons
if ("href" in props) return;
// emojis in user statuses
if (props?.target?.classList != null && [...props.target.classList].some(x => x === "emoji")) return;
const { square, nearestNeighbour } = settings.use(["square", "nearestNeighbour"]); const { square, nearestNeighbour } = settings.use(["square", "nearestNeighbour"]);
children.push( children.push(