From 10ad3572be13b5af3b5dd467c89dbfe379864c40 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 22 Nov 2022 17:13:29 +0300 Subject: [PATCH] fixed error --- public/akaunting-js/generalAction.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 9fd89774a..9458e6820 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -478,6 +478,10 @@ document.querySelectorAll('[data-page-title-first]').forEach((first) => { let title_truncate = first.querySelector('[data-title-truncate]'); if (title_truncate !== null) { + //added for equalize h1 width and parent element width. Because parent element has -ml-0.5 so didn't equalize + first.querySelector('h1').classList.add('mr-0.5'); + //added for equalize h1 width and parent element width. Because parent element has -ml-0.5 so didn't equalize + if (first.clientWidth < title_truncate.clientWidth && second.clientHeight > 0) { // added specific width styling for truncate text title_truncate.style.width = first.clientWidth + 'px'; @@ -505,6 +509,8 @@ document.querySelectorAll('[data-page-title-first]').forEach((first) => { this.classList.add('truncate'); }); // added truncate animation for truncated text + + first.querySelector('h1').classList.remove('mr-0.5'); } }