self-focused
self-focused copied to clipboard
refactor(scrollTo): Refactoring window.scrollTo to document.body.scrollTop/scrollLeft to avoid focus race condition in Safari 12
To fix issue #10 we want to use document.body.scrollLeft/scrollTop rather than window.scrollTo because in Safari 12 there is an issue where the scroll that happens internally from focusing clobbers window.scrollTo
Updated to use document.body.scrollTop and document.body.scrollLeft
@erinsinger93 this seems reasonable, has this been tested to work as expected in modern browsers?
@erinsinger93 Thanks for fixing #10 @sarbbottam Are we good to merge this?
@krisselden could you share your thoughts!