From bb23efd4e71a0691fc9af443426eec406b983a31 Mon Sep 17 00:00:00 2001 From: Shrihari Mahabal Date: Tue, 24 Feb 2026 12:52:15 +0530 Subject: [PATCH] refactor: button inner text change without html manipulation --- frappe/public/js/frappe/list/list_view.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 375cee1d0a..d671ed20b0 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -320,9 +320,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { const btnRect = btn[0].getBoundingClientRect(); if (btnRect.right > containerRect.right) { const short_label = __("Add"); - btn.attr("title", add_button_label) - .tooltip({ delay: { show: 100, hide: 100 }, trigger: "hover" }) - .html(``); + btn.attr("title", add_button_label).tooltip({ + delay: { show: 100, hide: 100 }, + trigger: "hover", + }); + btn.find("span").text(short_label); } }