#MOJO_AUTO_SUSPEND_ENABLED = False on HTML5
Monkey Forums/Monkey Bug Reports/#MOJO_AUTO_SUSPEND_ENABLED = False on HTML5
| ||
Hi mark Since 2 or more version (i use currently 85b) i have an bug on the html5 target. When i use #MOJO_AUTO_SUSPEND_ENABLED = False and the canvas lost his focus, there accept no more key inputs until i focus the canvas manually with TAB. Any idea what you have changed for this behaviour? best regards |
| ||
Well, that's probably been in there for ages! Fixed in v86b - now available. |
| ||
Will there be a fix for the free version too? |
| ||
Eventually...it's not a priority! |
| ||
Mark, for the free version cant dano alter the targets\html5\modules\native\html5game.js, add the else condition to onfocus himself?:canvas.onfocus=function( e ){ if( CFG_MOJO_AUTO_SUSPEND_ENABLED=="1" ){ game.ResumeGame(); }else{ game.ValidateUpdateTimer(); } } |
| ||
hi mark, i tried today your fix. But my issue is still there, always i click outside of the canvas and click return into the canvas, i got no focus on the canvas (the method onfocus got not called), so i must first press Tab to select the canvas :/ *edit* after multiple tests, i find out, that when i remove the if condition on line 385 in html5game.js, so the canvas got back his focus on click. you "eat" the event, so the browser can't activate the canvas. https://github.com/blitz-research/monkey/blob/develop/targets/html5/modules/native/html5game.js#L473 |