I'm guessing that the current blur/focus detection is targeting the document instead of the electron window. I also haven't yet confirmed whether activeWindow and activeDocument are tracking correctly here either, but I would guess they have the same issue, likely it would show up if you alt-tab to a window with an active webview, dialogs might open in a different window, etc. (And I had something like that happen at one point, need to work out a repro though.)
It looks like the window-level focus/blur detection (for the rootsplit and popouts) could maybe just switch to using the electron window since they're conditional on Platform.isDesktopApp anyway. (I think, though, that the document focus stuff might also need some work since focusing into a web view appears to lose is-focused on the current window as well.)
This applies to anything that uses webviews, not just canvases, but here's a canvas repro:
Steps to reproduce:
I'm working around it with this:
I'm guessing that the current blur/focus detection is targeting the document instead of the electron window. I also haven't yet confirmed whether activeWindow and activeDocument are tracking correctly here either, but I would guess they have the same issue, likely it would show up if you alt-tab to a window with an active webview, dialogs might open in a different window, etc. (And I had something like that happen at one point, need to work out a repro though.)
It looks like the window-level focus/blur detection (for the rootsplit and popouts) could maybe just switch to using the electron window since they're conditional on Platform.isDesktopApp anyway. (I think, though, that the document focus stuff might also need some work since focusing into a web view appears to lose
is-focused
on the current window as well.)