Fix scroll JS for xkcd.
Fix wrong scroll.height for xkcd. Solution according to: http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript
This commit is contained in:
parent
05dddf4f13
commit
a22ae2818c
@ -61,12 +61,13 @@ window._qutebrowser.scroll = (function() {
|
||||
|
||||
funcs.pos = function() {
|
||||
var elem = document.documentElement;
|
||||
var body = document.body;
|
||||
|
||||
var pos = {
|
||||
"px": {"x": window.scrollX, "y": window.scrollY},
|
||||
"scroll": {
|
||||
"width": elem.scrollWidth,
|
||||
"height": elem.scrollHeight,
|
||||
"width": Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth),
|
||||
"height": Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight),
|
||||
},
|
||||
"inner": {
|
||||
"width": window.innerWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user