Description of the issue:
When moving mouse from one monitor to another Brave gains focus even when it’s not the window on top.
How can this issue be reproduced?
Not sure as it doesn’t happen consisten, but having a 2nd profile of Brave open on a 2nd monitor, and having another profile open on the main monitor, with another window on top, but not full screen, sometimes, at random, when moving mouse from monitor 2 to monitor 1 the Brave window comes to the front, covering the window that was open on top of it.
Brave shouldn’t gain focus for no reason.
Brave Version( check About Brave):
Version 1.29.81 Chromium: 93.0.4577.82 (Official Build) (64-bit)
Have a Youtube video playing in a background window and in a different one have anything open. When the video comes to an end and if you have auto-play enable, when Youtube goes to the next video Brave for whatever reason will bring that window to focus.
I had this annoyance a while ago with two monitors on a Mac. It was annoying because there did not seem to be a rational reason for it and if an application is demanding attention by bringing itself to the front without a proper explanation it is a concern.
It bothers me because I am not unconvinced that Brave is up to something in the background and my concern are not eased by the frequent hyper-CPU usage.
Brave is always doing something in the background, even when a profile is closed. I had it happen many times that a profile is closed, a pop-up for an ads shows up and it opens in the profile that was closed (There is no reason for this to happen imo) But again, Brave keeps running even when you closed the profile, so not sure what’s going on with that. Maybe it’s related, Brave handles different profiles very poorly and maybe that’s why a window keeps gaining focus when it shouldn’t.
If you have a Brave window open and an Brave Ad appears, when you click on that ad or click the x on that ad, the Brave window will take the focus, you are correct. This is expected for clicking on an ad, as doing so should open the browser and display the ad.. However, I do believe we are aware of the browser gaining focus when clicking on the x in the ad.
There may be Brave processes that run in the background (such as the updater for example) but if you close Brave entirely then there is no way for it to gain focus, as there is nothing to focus on. However, as for your original issue, I believe this has to do with ads and/or any extension(s) you have installed in one or both of your profiles.
Since you found a way to reproduce this, I would try and test this with two newly created profiles and see if the issue reproduces with them as well. If it does not, then it’s most likely something specific to the profiles you’re using. So I would try the following: