Brave gaining focus at random

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.

Expected result:
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)

To add to this. I found a way to reproduce it.

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.

Thank you for reporting. Testing right now to try and reproduce.

So it doesn’t appear to happen for me on either macOS or Windows. I’m actually wondering if this has to do with ads at all – do you have Brave ads enabled at this time?

Additionally (but separately) do you have any extensions installed in either profile?

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 Ads are enabled yes.

As for extensions yes, there are extensions active in both profiles.

I will try to do more tests including disabling extensions to see if I find any pattern.

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.

:point_up: 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:

  1. Create two new temp profiles and ensure that you only have those two profile windows open when performing this test.
  2. Attempt to reproduce the issue as you described here: Brave gaining focus at random - #2 by A2020

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.