Skip to content

Limited number of results on homepage #1192

@rgaudin

Description

@rgaudin

I've stumbled across a weird bug on Firefox. It seems that when I have the developer console open, I only get the books from the first request and then I can not load any more books.

What happens is that the condition for showing the footer is always false on that first request.
Resizing the window fixes it so I believe it's linked to the discrepancy between available size and estimated one.

Image
window.innerWidth
1395
window.innerHeight
1331
const zoom = Math.floor((( window.outerWidth - 10 ) / window.innerWidth) * 100);
undefined
zoom
182
Math.floor((window.innerHeight/(3*zoom) + 1)*(window.innerWidth/(2.5*zoom) + 1));
13
document.querySelector('.kiwixHomeBody__results').innerHTML
"995 book(s)"

In loadBooks(), I do have a results=995 and bookOrderMap.size=13 and so the footer is not shown.
I don't get how results could be different on the first request though…

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions