Skip to content

Commit

Permalink
fix: fix breaking changes in chrome 61
Browse files Browse the repository at this point in the history
Fixes #1.
  • Loading branch information
colinmeinke committed Oct 12, 2017
1 parent 3e7b7b4 commit 035bb59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/hello-world/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>

<body>
<a href="#hello-world" class="js-tinyscroll">
<a href="#hello-world" class="js-tinyscroll" style="display: block; margin-top: 500px;">
Scroll to Hello World section
</a>

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const init = ({
el.addEventListener('click', e => {
e.preventDefault()

const begin = document.body.scrollTop
const begin = document.documentElement.scrollTop || document.body.scrollTop
const end = begin + target.getBoundingClientRect().top
const startTime = Date.now()

Expand Down

0 comments on commit 035bb59

Please sign in to comment.