Skip to content

Commit ff0a6b0

Browse files
ChristophKaserglibas
authored andcommitted
Corrects viewport dimensions in chrome 54
Before these changes, the viewport height returned by chrome was equal to the document height (at least in quirks mode)
1 parent bc66464 commit ff0a6b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
1+
return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
1+
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

0 commit comments

Comments
 (0)