Open subsoap opened 7 years ago
@erikangelin-king @subsoap solved in 1.2.128 ? https://forum.defold.com/t/defold-1-2-128-has-been-released/20139?u=agulev
@AGulev Yes!
Wait, actually, I think this is a different issue.
I think the issue is that the engine detects if the browser Window has focus, but not if the canvas has click focus. I'll have to make a new test.
DEF-2520
Currently HTML5 jsweb target ( via window.WINDOW_EVENT_FOCUS_LOST window.WINDOW_EVENT_FOCUS_GAINED ) detects if current window has focus or not, but this seems incorrect it should be the current window has focus + app canvas has focus. I'm not sure best way to do it, but document.activeElement does return the currently active element and it could be checked to see if the app canvas is active or not. Might be better solutions though.
To clarify why this is important, key input isn't given to game canvas unless it has focus. If game relies on keyboard input player needs to be able to told to click once to give focus. When clicking the standard fullscreen button focus on the canvas is lost.