Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'set' of undefined #15

Open
elambro opened this issue Sep 11, 2020 · 1 comment
Open

Cannot read property 'set' of undefined #15

elambro opened this issue Sep 11, 2020 · 1 comment

Comments

@elambro
Copy link

elambro commented Sep 11, 2020

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
Copy link

brignolij commented Feb 9, 2021

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

skyswitzerland pushed a commit to skyswitzerland/scroll-behavior-polyfill that referenced this issue Feb 9, 2021
skyswitzerland pushed a commit to skyswitzerland/scroll-behavior-polyfill that referenced this issue Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants