Use consistent window size properties to improve popup positioning (#1607)

This commit is contained in:
toasted-nutbread 2021-04-09 18:17:02 -04:00 committed by GitHub
parent 331b164900
commit b23c4bff4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -664,11 +664,10 @@ class Popup extends EventDispatcher {
} }
} }
const body = document.body;
return { return {
left: 0, left: 0,
top: 0, top: 0,
right: (body !== null ? body.clientWidth : 0), right: window.innerWidth,
bottom: window.innerHeight bottom: window.innerHeight
}; };
} }