From 064caaa3b40e8bebf7d88b33b205c692ef60ede5 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 27 May 2023 14:59:58 +0530 Subject: [PATCH] fix: only show menu button if it contains action items --- frappe/public/js/form_builder/form_builder.bundle.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frappe/public/js/form_builder/form_builder.bundle.js b/frappe/public/js/form_builder/form_builder.bundle.js index b1c04584be..87767d6961 100644 --- a/frappe/public/js/form_builder/form_builder.bundle.js +++ b/frappe/public/js/form_builder/form_builder.bundle.js @@ -113,6 +113,9 @@ class FormBuilder { this.go_to_doctype_btn.hide(); this.go_to_customize_form_btn.hide(); + this.page.menu_btn_group.show(); + let hide_menu = true; + // show customize form & Go to customize form btn if ( this.store.doc && @@ -147,6 +150,10 @@ class FormBuilder { this.go_to_doctype_list_btn.text(label).show(); } + if (hide_menu && window.matchMedia("(min-device-width: 992px)").matches) { + this.page.menu_btn_group.hide(); + } + // toggle preview btn text this.preview_btn.text(this.store.preview ? __("Hide Preview") : __("Show Preview"));