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

Extend shouldBailOut to check for existence of attached DOM element #169

Closed
wants to merge 1 commit into from
Closed

Extend shouldBailOut to check for existence of attached DOM element #169

wants to merge 1 commit into from

Conversation

Phunky
Copy link

@Phunky Phunky commented Jan 28, 2021

This extends shouldBailOut to ensure that the provided DOM element reference is still attached to the DOM, we had a situation where we called scrollIntoView on an element that had since been removed which would throw TypeError: undefined is not an object (evaluating 'el.clientHeight') (anonymous function) — smoothscroll.js:117 and cause scrolling to break.

I believe this should fix #138 and may also resolve #161.

@Phunky Phunky closed this Feb 9, 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

Successfully merging this pull request may close these issues.

null as the first argument causing a TypeError Safari Exception when smooth scrolling to documentElement
1 participant