Screen orientation, Keep Display on (in Android Client)

This commit is contained in:
Robin E. R. Davies
2025-07-19 00:06:17 -04:00
parent 818a08824c
commit 9b6798134d
15 changed files with 559 additions and 51 deletions
+16 -16
View File
@@ -100,23 +100,23 @@
// Run the function when the window loads
window.addEventListener('load', removeHashOnLoad);
function getFocusedElementBounds() {
let focusedElement = document.activeElement;
if (focusedElement && focusedElement !== document.body) {
let rect = focusedElement.getBoundingClientRect();
return {
top: rect.top,
left: rect.left,
right: rect.right,
bottom: rect.bottom,
windowWidth: window.innerWidth,
windowHeight: window.innerHeight,
};
}
return null;
}
// used by Android client to perform focus scrolling on keyboard open.
// function getFocusedElementBounds() {
// let focusedElement = document.activeElement;
// if (focusedElement && focusedElement !== document.body) {
// let rect = focusedElement.getBoundingClientRect();
// return {
// top: rect.top,
// left: rect.left,
// right: rect.right,
// bottom: rect.bottom,
// windowWidth: window.innerWidth,
// windowHeight: window.innerHeight,
// };
// }
// return null;
// }
</script>