Skip to content

Make it possible to scrollIntoView() to document.body#129

Open
arktds wants to merge 1 commit intoiamdustan:masterfrom
arktds:scrollIntoView-to-body
Open

Make it possible to scrollIntoView() to document.body#129
arktds wants to merge 1 commit intoiamdustan:masterfrom
arktds:scrollIntoView-to-body

Conversation

@arktds
Copy link

@arktds arktds commented Nov 2, 2018

This PR enables the following scroll.

document.body.scrollIntoView({
  behavior: 'smooth'
})

function findScrollableParent(el) {
var isBody;

if (el === d.body) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we did var isBody = el === d.body would this work? Instead of early exiting the rest of the logic will continue working as expected I think.

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.

2 participants