Skip to content

Commit

Permalink
fix(goTo): get clientHeight from <html> when target is <body>
Browse files Browse the repository at this point in the history
body.clientHeight === body.scrollHeight in iOS

fixes #6914
  • Loading branch information
KaelWD committed Jul 26, 2019
1 parent d9b6867 commit 3f96592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vuetify/src/components/Vuetify/goTo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export default function goTo (_target: GoToTarget, _settings: Partial<GoToSettin

container.scrollTop = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress))

if (progress === 1 || container.clientHeight + container.scrollTop === container.scrollHeight) {
const clientHeight = container === document.body ? document.documentElement.clientHeight : container.clientHeight
if (progress === 1 || clientHeight + container.scrollTop === container.scrollHeight) {
return resolve(targetLocation)
}

Expand Down

0 comments on commit 3f96592

Please sign in to comment.