fix(menu): handle all types of url

This commit is contained in:
sokumon 2026-01-09 13:07:51 +05:30
parent e0a7775d59
commit d24edbec29

View file

@ -155,7 +155,13 @@ frappe.ui.menu = class ContextMenu {
});
me.hide();
me.opts.onHide && me.opts.onHide(me);
frappe.set_route(item.url);
if (item.url.startsWith("/desk")) {
frappe.set_route(item.url);
} else if (item.url.startsWith("/")) {
window.location.href = window.location.origin + item.url;
} else {
window.open(item.url, "_blank").focus();
}
});
}
}