Mac Studio focus switching issue while typing - V2

As I'm typing this the focus will switch away from this app (browser or any other app) while I'm typing. it doesn't switch to any particular app just not this app so I can't keep typing without clicking on the app again to regain focus.


I've tried closing all apps and it still occurs. Restarting is the only fix. It could be specific to this Mac Studio as I haven't had the issue on my MacBook Pro or Mac Mini.


It will randomly start happening, like this morning, and is now switching focus away about every 10 seconds.


When the focus switches, it does stay on the app I'm working with. For example Chrome, when the focus switches I see in the upper left that Chrome is still in focus but the window I'm working on is not in focus.


Or while I'm in Adobe Premiere, the window focus basically turn off. Normally there is a blue line around the window that is in focus in Premiere, then this happens the blue line goes away and no window is actually in focus.


On Sequoia 15.4 and a few versions earlier but I can't remember when it started, at least 15.2

Mac Studio 2022 - M1 Ultra


When the focus switches, it does stay on the app I'm working with. For example Chrome, when the focus switches I see in the upper left that Chrome is still in focus but the window I'm working on is not in focus.



Mac Studio, macOS 15.4

Posted on Apr 14, 2025 1:49 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 20, 2025 11:13 AM

Give this a try: boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.


NOTE 1: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

Deletes font caches, kernel cache, and other system cache files


NOTE 2: if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode. This makes it act as a wired keyboard as will insure a successful boot into Safe Mode.


10 replies
Question marked as Top-ranking reply

Apr 20, 2025 11:13 AM in response to FutureX

Give this a try: boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.


NOTE 1: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

Deletes font caches, kernel cache, and other system cache files


NOTE 2: if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode. This makes it act as a wired keyboard as will insure a successful boot into Safe Mode.


Apr 30, 2025 11:07 AM in response to FutureX

The two key points of Safe Booting are:


• Verifies your startup disk and attempts to repair directory issues, if needed 

• Deletes font caches, kernel cache, and other system cache files


So you don't need to stay in Safe Mode. If the problem remains after a normal boot the problem is not in the caches or directory issues.


So the next step would be to please download and run Etrecheck.  The free version is sufficient.


Copy and paste the results into your reply. Etrecheck is a diagnostic tool that was developed by one of the most respected users here in the ASC and recommended by Apple Support  to provide a snapshot of the system and help identify the more obvious culprits that can adversely affect a Mac's performance.


Copy the report



and after clicking on the Reply button use the Additional Text button to paste the report in your reply.



Check Etrecheck's Privacy settings and make sure the checkbox for full disk access before running:


Then we can examine the report and see if we can determine the cause of the problem.


Jun 3, 2025 10:28 AM in response to FutureX

Checking with ChatGPT I found this:


That’s a classic “phantom window steal” issue


We tried several fixes to determine which app was stealing focus but were unable to find the real culprit yet it continues to happen.


I ran this:

log stream --info --predicate 'process == "WindowServer" OR process == "loginwindow" OR eventMessage CONTAINS "CGS"' --style compact


which returned this response from ChatGPT:


This is a classic hidden UI agent issue — something is triggering a modal UI, alert, or ghost window that:


  • Doesn’t show visually
  • Steals keyboard input
  • Doesn’t register in lsappinfo front
  • Disappears after a few seconds or when you click


When a reboot fixes it for days or even weeks, that points very strongly to a stateful bug — something that:


  • accumulates or degrades over time (e.g., memory leak, event handler stacking)
  • doesn’t show up in logs clearly
  • is reset only by restarting the WindowServer, either manually or via full reboot



But we couldn't pinpoint the culprit.

Jun 3, 2025 10:37 AM in response to FutureX

That's not necessarily true. A safe boot performs the following actions where as a normal reboot does not:


NOTE 1: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

Deletes font caches, kernel cache, and other system cache files


NOTE 2: if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode. This makes it act as a wired keyboard as will insure a successful boot into Safe Mode.



Apr 20, 2025 10:01 AM in response to Owl-53

I'm not touching any keys when it happens. It's happening again right now.


For example this text box I'm typing in here on the support forum has a blue line around it when I'm typing in it (has focus) however, randomly whether I'm typing or not touching the keyboard the focus will shift away so I have to click in the box again to regain focus to continue typing.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac Studio focus switching issue while typing - V2

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.