Position reconciliation box correctly if table scrolled

This commit is contained in:
RunasSudo 2025-06-22 22:08:33 +10:00
parent 959490f0c2
commit fe8901bf2e
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1,6 +1,6 @@
<!--
DrCr: Web-based double-entry bookkeeping framework
Copyright (C) 20222025 Lee Yingtong Li (RunasSudo)
DrCr: Double-entry bookkeeping framework
Copyright (C) 2022-2025 Lee Yingtong Li (RunasSudo)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -171,7 +171,7 @@
const outerDiv = document.getElementById('statement-line-list')!;
const divReconciler = document.getElementById('statement-line-classifier')!;
divReconciler.classList.remove('hidden');
divReconciler.style.top = (td.getBoundingClientRect().y - outerDiv.getBoundingClientRect().y - 4) + 'px';
divReconciler.style.top = (outerDiv.scrollTop + td.getBoundingClientRect().y - outerDiv.getBoundingClientRect().y - 4) + 'px';
divReconciler.style.left = (td.getBoundingClientRect().x - outerDiv.getBoundingClientRect().x) + 'px';
// Focus classify line panel