Skip to main content
Question

OneDrive steals focus from active windows


RaGL
Forum|alt.badge.img+7

We're seeing a strange issue for a few weeks now.
The active window starts to lose focus randomly, which is a bit hard to explain, but for example, while typing every 20 seconds the textfield greys out for 5 secs then it's active again, which makes it impossible to work as this doesn't stop.
With the help of the following python script (Brian33 on Nov 18, 2022), we found that OneDrive always steals the focus for a few seconds:
https://forums.macrumors.com/threads/active-window-loses-focus.2321723/

The only fix currently is to close OneDrive and re-open it, but this needs to be done always once the Mac restarts.
So I created a script to close and re-open OneDrive during login, but it would be great to find a real solution.

 

Our OneDrive version is always the most recent one: 23.056.0314

Anybody else facing those issues?

 

 

3 replies

Forum|alt.badge.img+4
  • Contributor
  • May 17, 2024

I see the same on my mac, but haven't heard any user complaints so far.


BoazC
  • New Contributor
  • September 25, 2026

I couldn't find anything that still works on current Windows 10/11, so I wrote a small free tool for this: NoFocusSteal (https://github.com/BoazCohenJ/NoFocusSteal). Disclosure: I'm the author.

It runs in the tray. If another app grabs focus while you're typing, it puts focus straight back into your window, usually within a few dozen milliseconds, and flashes the other app's taskbar button instead so you can switch to it when you want. Things you do yourself (clicking, Alt+Tab, Win-key shortcuts, dialogs, the Start menu) aren't affected. There's also a Strict mode that blocks anything you didn't click or press for, and a log of every focus change showing the exe responsible.

It's a single ~100 KB exe with no installer, no DLL injection and no network access, and it's MIT licensed. The log window has a "Test it" button that shows it blocking a test window.


eos_bebu
Forum|alt.badge.img+4
  • New Contributor
  • September 30, 2026

We had a similar issue with another software in the past, which was only resolved by the vendor with an updated system extension. 

In your case I would check your PPPC profile and if onedrive is trying to authenticate or what-so-ever, you may check your logs in ~/Library/Logs/OneDrive/ . 

You may also want to take a look in the non-interactive sign in logs in Intune for your users, maybe you find failed sign ins from OneDrive or so. 

Do you use Platform SSO?