Below is the code I placed in a web browser control's Other event:
Constant UnsignedInt WM_KILLFOCUS = 8 // The message ID for the WM_KILLFOCUS event.
// You can utilize a non-sorted ListBox control to keep a list of the
// event ID's handled by the Other event, if desired (a handy tip).
//lb_1.AddItem(String(Message.Number))
If Message.Number = WM_KILLFOCUS Then
Post Function MessageBox("LoseFocus","The web browser has lost user input focus.")
// Tell Windows the WM_KILLFOCUS message has been handled.
Message.Processed = True
Return 1
Else
// Tell Windows this "other" message has NOT been handled.
Message.Processed = False // This is the default
End If
Return 0
With this code in place, I do see a WM_KILLFOCUS event get fired... occasionally. However, it appears it occurs ONLY when an input field in the web page (like a search input field) is given input focus at some point, then you tab/backtab through the hot links in the page until finally, you tab out of the web browser control to another enabled control in the window.
I don't believe this is standard Windows control behavior, so this may be evidence that there are indeed "issues" with the Chromium-based browser, as Chris has alluded to.
Note the commented line near the top of the script. An unsorted ListBox control can be used to track/list all of the Windows WM_xxxxx event ID numbers handled by the Other event. This is a simple and easy way to see what events get sent to the catch-all "Other" event in PB.
There are lists of Windows Event ID numbers/names available on the web. Here's the one I use:
https://wiki.winehq.org/List_Of_Windows_Messages
Once I have the WM_xxxxxx event name, I can look up more information about that event. Here is my go-to site for Windows API information:
https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-api-list