Scroll-snap css breaks in electron

I have a scrollable element that functions properly when not in electron, as so: Scrollable element has a class with css scroll-snap-type: y mandatory, which snaps user scrolling to ‘paged’ stops (css scroll-snap-align: center;) of scrollable element. I also have a custom scroll button to auto-scroll to next or previous page, which adds a class to the element that suspends css scroll-snapping (scroll-snap-type:none). After auto-scrolling, the class that suspends scroll-snapping is removed. Tha all works when not in electron, but in electron, scroll-snapping works at first, but breaks when I remove scroll-snapping, then again restore scroll-snapping with css class.