mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 12:49:52 +01:00
Fix counter display number incorrectly displayed on the page (#29448)
issue : #28239 The counter number script uses the 'checkbox' attribute to determine whether an item is selected or not. However, the input event only increments the counter value, and when more items are displayed, it does not update all previously loaded items. As a result, the display becomes incorrect because it triggers the update counter script, but checkboxes that are selected without the 'checked' attribute are not counted (cherry picked from commit 252047ed2e09e3f1f1ab394cd62995cf4cabe506)
This commit is contained in:
parent
9c5afa0b8f
commit
afc21e6aa7
1 changed files with 2 additions and 0 deletions
|
@ -43,9 +43,11 @@ export function initViewedCheckboxListenerFor() {
|
|||
// Mark the file as viewed visually - will especially change the background
|
||||
if (this.checked) {
|
||||
form.classList.add(viewedStyleClass);
|
||||
checkbox.setAttribute('checked', '');
|
||||
prReview.numberOfViewedFiles++;
|
||||
} else {
|
||||
form.classList.remove(viewedStyleClass);
|
||||
checkbox.removeAttribute('checked');
|
||||
prReview.numberOfViewedFiles--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue