wessberg / scroll-behavior-polyfill

A polyfill for the 'scroll-behavior' CSS-property
MIT License
102 stars 17 forks source link

Cannot read property 'set' of undefined #15

Open elambro opened 4 years ago

elambro commented 4 years ago

For old Android Chrome users (version < 80), the polyfill can throw an error - Cannot read property 'set' of undefined. The following changes:

var ELEMENT_ORIGINAL_SCROLL_TOP_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT
        ? undefined
        : (Object.getOwnPropertyDescriptor(Element.prototype, "scrollTop")||{}).set;

and

    var ELEMENT_ORIGINAL_SCROLL_LEFT_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT
        ? undefined
        : (Object.getOwnPropertyDescriptor(Element.prototype, "scrollLeft")||{}).set;

will let it fail silently.

brignolij commented 3 years ago

Hi, any update on this issue, i'm facing the same. Regards