scroll-behavior-polyfill icon indicating copy to clipboard operation
scroll-behavior-polyfill copied to clipboard

Cannot read property 'set' of undefined

Open elambro opened this issue 5 years ago • 1 comments

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.

elambro avatar Sep 11 '20 09:09 elambro

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

brignolij avatar Feb 09 '21 13:02 brignolij