Skip to content

Commit d2e3a49

Browse files
committed
JS: use clientWidth instead of offsetWidth
It's seems better since we don't use padding attribute, and scrollWidth wouldn't include it anyway.
1 parent 348e0e5 commit d2e3a49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template.html.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
function updateProgressBarVisibility() {
5555
document.querySelectorAll('.progress-bar').forEach(progressBar => {
5656
const barWithOverflowWidth = progressBar.scrollWidth;
57-
const barWidth = progressBar.offsetWidth;
57+
const barWidth = progressBar.clientWidth;
5858
5959
if (barWidth < barWithOverflowWidth) {
6060
progressBar.classList.add('low');

0 commit comments

Comments
 (0)