Problem Description
If a stand-alone browser window loses focus into the desktop background (not minimized or in an adjacent tab) then the On Suspended / On Resumed triggers do not fire in the Browser object (with pause on unfocus = false). If Project Properties pause on unfocus is set True then the feature works correctly - but only in preview and not on export.
Attach a Capx
link to capx
Description of Capx
The capx displays 2 text objects to list Browser Triggers and Keyboard KeyDown and KeyUp Triggers.
Steps to Reproduce Bug
- Run layout (Properties Pause On Unfocus set False) in stand-alone browser / NW window on one side of the desktop, with another application visible such that when you click on the 2nd window, the test browser window will remain visible
- With the layout running, click on something to unfocus the test browser window, then click back on the test browser window
- Observe that no Triggers are recorded in the Browser trigger text list when it comes back into focus
- Then run the layout again, but with Properties Pause On Unfocus set True
- Observe that the triggers fire correctly.
Observed Result
As described above. It appears that the Pause on Unfocus is able to detect all unfocus/blur conditions, but the browser triggers do not always register these. You can confirm that the browser is going out of focus by holding a key down when you click on another window and then releasing the key when it's out of focus - the key up trigger does not get recorded in this case. Additionally, if you do minimize the window, the Browser Page Is Visible boolean never becomes false.
Expected Result
The On Suspended / On Resumed triggers should fire when the window becomes back in focus when it is not in preview and they should fire with Pause on Unfocus set to false when running in preview. Without these triggers firing there is no way to detect if a key up trigger could have been missed by the unfocus / blur event. I apologize if I am misunderstanding the purpose of these triggers. If that is the case, could we have a On Focus and On Blur trigger to cover this?
Affected Browsers
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES - Pause on Unfocus makes no difference and the test does not pause on unfocus...)
Operating System and Service Pack
W8.1 x64
Construct 2 Version ID
r208 64 bit