fix(core): 🐛 round scrollLeft to integer

Fractional pixels from scrollLeft prevent Citizen from detecting overflow state properly.
This commit is contained in:
alistair3149 2024-04-24 16:19:29 -04:00
parent b0affaf53a
commit d9675ebd60
No known key found for this signature in database

View file

@ -21,7 +21,7 @@ function setupOverflowState( element ) {
return; return;
} }
const currentPosition = element.parentNode.scrollLeft; const currentPosition = Math.ceil( element.parentNode.scrollLeft );
if ( currentPosition <= 0 ) { if ( currentPosition <= 0 ) {
// At the start // At the start