This is by design, almost all events use the server window as the base window, so if a script needs to target a window related to particular event it will need to do so based on the parameters for that event.