Skip to content

Commit ec388a9

Browse files
committed
set screenY and screenTop to 0 when equal to screen height
1 parent 3e9a442 commit ec388a9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/features/web-compat.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { URL } from '../captured-globals.js'
55
* Fixes incorrect sizing value for outerHeight and outerWidth
66
*/
77
function windowSizingFix () {
8+
// macOS browser incorrectly reports window height for window.screenY / window.screenTop
9+
if (window.screenY === window.screen.height) {
10+
window.screenY = window.screenTop = 0
11+
}
12+
813
if (window.outerHeight !== 0 && window.outerWidth !== 0) {
914
return
1015
}

0 commit comments

Comments
 (0)