Backport #29448 by @charles7668 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 Co-authored-by: charles <30816317+charles7668@users.noreply.github.com> (cherry picked from commit 5477728282de19b1638691b88449b1933ed5a4d8)
This commit is contained in:
parent
0b287c4d4c
commit
8babbe7ccf
1 changed files with 2 additions and 0 deletions
|
@ -44,9 +44,11 @@ export function initViewedCheckboxListenerFor() {
|
||||||
// Mark the file as viewed visually - will especially change the background
|
// Mark the file as viewed visually - will especially change the background
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
form.classList.add(viewedStyleClass);
|
form.classList.add(viewedStyleClass);
|
||||||
|
checkbox.setAttribute('checked', '');
|
||||||
prReview.numberOfViewedFiles++;
|
prReview.numberOfViewedFiles++;
|
||||||
} else {
|
} else {
|
||||||
form.classList.remove(viewedStyleClass);
|
form.classList.remove(viewedStyleClass);
|
||||||
|
checkbox.removeAttribute('checked');
|
||||||
prReview.numberOfViewedFiles--;
|
prReview.numberOfViewedFiles--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue