Rescroll.js

Keep viewport in the right place on window resize

See below or Try it live

Without Rescroll

With Rescroll


The Problem

In many responsive webpages, elements often resize itself when user resizes viewport, this then causes the region user was focusing on to float out of viewport. Rescroll tries to solve this by scrolling back to the right position on each resize event.


Try it

1. Go to a random Wiki page or a random Medium article

2. Put this snippet on your console

3. Scroll down & resize


Installation & API docs

Created by Marani

Fork me on GitHub