fix(menu): handle correctly for nested menu

This commit is contained in:
sokumon 2026-01-06 19:23:19 +05:30
parent ec922e8e76
commit c9a0c97134

View file

@ -117,11 +117,17 @@ frappe.ui.menu = class ContextMenu {
let dropdown = frappe.menu_map[this.opts.parent_menu].template;
let width = dropdown.outerWidth();
let offset = $(dropdown).offset();
let left = offset.left;
if (frappe.utils.is_rtl()) {
left = left - width - this.gap;
} else {
left = width + this.gap;
}
this.template.css({
display: "block",
position: "absolute",
top: top + "px",
left: offset.left + width + this.gap + "px",
left: left + "px",
});
} else {
this.template.css({