Skip to content

Commit 11eef3c

Browse files
nudTrim
authored andcommitted
Fix scrolling to the bottom of the page when using shift+g
`$("body").attr("scrollHeight")` was returning undefined, so we get the page height another way.
1 parent bef47be commit 11eef3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/assets/javascripts/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ $(document)
171171
return false;
172172
})
173173
.bind("keypress", "shift+g", function() {
174-
$("html,body").animate({ scrollTop: $("body").attr("scrollHeight") }, 500);
174+
$("html,body").animate({ scrollTop: document.body.offsetHeight }, 500);
175175
return false;
176176
})
177177
.bind("keypress", "shift+?", function() {

0 commit comments

Comments
 (0)