summaryrefslogtreecommitdiffhomepage
path: root/external_assets/shell.html
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-05-31 17:28:11 -0400
committerrealtradam <[email protected]>2023-05-31 17:28:11 -0400
commit3e99964a99f4926a12ff2f2eae3e0137ea8585ff (patch)
tree12a8a3e60c0d8d40799a01073b202bc4ea7d0acf /external_assets/shell.html
parente9b6b597e97c37e7fb0af50a56e051b5627aa296 (diff)
downloadTOJam2023-3e99964a99f4926a12ff2f2eae3e0137ea8585ff.tar.gz
TOJam2023-3e99964a99f4926a12ff2f2eae3e0137ea8585ff.zip
fix window focus issue on itch.io
Diffstat (limited to 'external_assets/shell.html')
-rw-r--r--external_assets/shell.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/external_assets/shell.html b/external_assets/shell.html
index c87a31f..91cceef 100644
--- a/external_assets/shell.html
+++ b/external_assets/shell.html
@@ -76,6 +76,17 @@
return canvas;
})()
};
+ /*var elem = document.getElementById('canvas');
+ elem.addEventListener('click', function(event) {
+ window.focus();
+ elem.setFocus();
+ });
+ document.body.addEventListener('click', function(event) {
+ window.focus();
+ elem.setFocus();
+ });*/
+ window.onload = function () { window.focus(); };
+ window.onclick = function () { window.focus(); };
</script>
{{{ SCRIPT }}}
</body>