From f911835a5d78e85ce9c2d2101435a77a654f5604 Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Tue, 28 Apr 2026 12:27:07 +0000 Subject: [PATCH] fix(sidebar): correct collapse sidebar icon direction in RTL --- frappe/public/js/frappe/ui/sidebar/sidebar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/ui/sidebar/sidebar.js b/frappe/public/js/frappe/ui/sidebar/sidebar.js index 0e942dbcdb..e13153a03b 100644 --- a/frappe/public/js/frappe/ui/sidebar/sidebar.js +++ b/frappe/public/js/frappe/ui/sidebar/sidebar.js @@ -576,16 +576,17 @@ frappe.ui.Sidebar = class Sidebar { expand_sidebar() { let direction; + const is_rtl = frappe.utils.is_rtl(); if (this.sidebar_expanded) { this.wrapper.addClass("expanded"); - direction = "right"; + direction = is_rtl ? "left" : "right"; $('[data-toggle="tooltip"]').tooltip("dispose"); this.wrapper.find(".avatar-name-email").show(); this.wrapper.find(".about-sidebar-link").show(); this.wrapper.find(".onboarding-sidebar span").show(); } else { this.wrapper.removeClass("expanded"); - direction = "left"; + direction = is_rtl ? "right" : "left"; $('[data-toggle="tooltip"]').tooltip({ boundary: "window", container: "body",