Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@curiousmedia/client-resized

curiousjason15MIT1.0.0

Detect if resize event was triggered by a window resize or a scroll event.

readme

Client Resized

Detect if resize event was triggered by a window resize or a scroll event. iOS devices trigger a resize event when scrolling down, causing the UI to collapse. This library seeks to circumvent this often undesirable iOS resize event.

Example

let cr = new ClientResized();
window.addEventListener('resize', () => {
    if(cr.resized()) {
        console.log('resized');
    } else {
        console.log('did not resize');
    }
});