Merge pull request #2766 from brkcvn/master
Fixed javascript console error
This commit is contained in:
commit
6b5e56f1db
6
public/akaunting-js/generalAction.js
vendored
6
public/akaunting-js/generalAction.js
vendored
@ -478,6 +478,10 @@ document.querySelectorAll('[data-page-title-first]').forEach((first) => {
|
|||||||
let title_truncate = first.querySelector('[data-title-truncate]');
|
let title_truncate = first.querySelector('[data-title-truncate]');
|
||||||
|
|
||||||
if (title_truncate !== null) {
|
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) {
|
if (first.clientWidth < title_truncate.clientWidth && second.clientHeight > 0) {
|
||||||
// added specific width styling for truncate text
|
// added specific width styling for truncate text
|
||||||
title_truncate.style.width = first.clientWidth + 'px';
|
title_truncate.style.width = first.clientWidth + 'px';
|
||||||
@ -505,6 +509,8 @@ document.querySelectorAll('[data-page-title-first]').forEach((first) => {
|
|||||||
this.classList.add('truncate');
|
this.classList.add('truncate');
|
||||||
});
|
});
|
||||||
// added truncate animation for truncated text
|
// added truncate animation for truncated text
|
||||||
|
|
||||||
|
first.querySelector('h1').classList.remove('mr-0.5');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user