mwmbl / front-end-original

A front-end for the mwmbl search engine written in vanilla javascript
https://mwmbl.github.io/front-end/
GNU Affero General Public License v3.0
13 stars 3 forks source link

Fix reduced motion search bar not centering on load #21

Closed sarayourfriend closed 2 years ago

sarayourfriend commented 2 years ago

Previously the app relied on the input event to evaluate the search and add the paddingTop to the body that centers the search bar.

This isn't the greatest approach but in the interest of preserving the existing behavior and getting this regression fixed, this PR introduces a quick hot fix. The new comments explain the general approach and the why. Let me know if more explanation is needed.

I also plan on opening a follow up PR later to explore ways for improving this to make the flow a little clearer.

ColinEspinas commented 2 years ago

Clear enough, thanks for the contribution!