Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, February 29, 2016 4:27 PM | 29 votes
Is there any way to stop applications from stealing focus?
Scenario 1: I start typing a password into RDC to remote into a production server, and some other application steals focus as I am typing.
I look up and my production password is on display unhidden to anyone behind me since it is now displayed in a text box of some application which stole focus from a password text box.
Scenario 2: I start typing a message in skype while windows is starting up. Some apps take longer to start so only finish after I am already typing.
Some other app steals focus after I complete my first word, but I carry on typing.
My entire message after the first word is lost since I cant touch type and I was typing into some modal window :(
Am I the only one endlessly annoyed by windows just allowing any old app to steal focus while users are actively interacting with applications?
I have looked around and this is a large problem with some solutions going back to XP but none for windows 8 and 10 so far that I can find.
Just in case I am not being clear, the requirement is that if my application has focus(i.e I am busy with something), then under no circumstances must another application (which may be starting up) come between me and my current task, ever.
I should go to the offending application by myself if it needs my attention, it should never interrupt me.
All replies (39)
Monday, February 29, 2016 9:37 PM ✅Answered
I too get affected by this, the Printer Management being one I notice the most with it sometimes takes awhile to bring up print properties due to third party drivers, then stealing the focus when it does. Most of the others I have learnt to live with, i.e. getting used to the timings etc.. Err, that was longer than my original planned 'no' response.
How To Prevent Programs From Stealing Focus in Windows is the only page I found that is kinda worth a read about identifying the culprits and trying to deal with them, or a couple of third party programs that may help. Also has a 'history' of how it worked with XP :)
Tuesday, March 1, 2016 6:49 AM ✅Answered
Hi MadAdminManSau,
As -Mr Happy- pointed out, the best way is to identify the culprits and try to deal with them.
Since these services are starting without your permission, we could try clean boot to disable them from been running automatically or using Autorun tool to remove the entries.
How to perform a clean boot in Windows
https://support.microsoft.com/en-us/kb/929135
Autoruns for Windows v13.51
https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
Best regards
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].
Monday, July 4, 2016 10:35 PM | 8 votes
That is no solution. The onus should be on Windows, not on the user, to prevent badly-behaving applications from stealing window activation away from the user.
Monday, July 4, 2016 10:36 PM | 9 votes
That is no solution. The problem is not with startup apps or specific apps; the problem is with ANY app trying to steal window activation AT ANY TIME (not just during startup/login). The only real solution would be logic built into the OS to prohibit an application from stealing activation away from the one the user is actually working with.
Thursday, July 21, 2016 6:50 PM | 13 votes
I have created a petition to get this fixed on Change.org since Microsoft refuses to acknowledge this flaw within their system.
Thursday, August 25, 2016 9:20 AM | 4 votes
I have created a petition to get this fixed on Change.org since Microsoft refuses to acknowledge this flaw within their system.
Awesome!!!
Wednesday, August 31, 2016 6:42 PM
I have the same issue. It's so god damned annoying. Firefox does it a lot as well. Makes having mutli monitors with multiple different windows open useless. I wish there was a damn fix.
Wednesday, November 2, 2016 2:31 AM | 3 votes
Why take away the link? ZigZag3143x
People shouldn't have to go looking for it themselves if they have already found this thread and want to sign the petition.
The name of the petition is
Stop Focus Stealing!
And the site is
www dot change dot org
/p/microsoft-stop-focus-stealing
Now it's not a link but people can find it easily
Saturday, December 24, 2016 10:10 AM
Exactly same problem. I am very surprised it was not solved yet.
May we have the Microsoft position on this?
Regards,
Roman
Wednesday, March 1, 2017 5:22 AM | 2 votes
The finally drove me nuts tonight while I was trying to watch the Alien : Covenant trailer. Before pressing play I went to launch Photoshop to do some work. While i was watching the trailer, Photoshop kept popping up to the front. FOUR times I had to switch back and rewind the trailer to catch what I missed. But it happens a LOT. I often switch programs and close the ones I'm not using to try to help system performance. Then while working on something I'll have a need for another program so I'll load it and go back to what I was doing while it loads. I'm usually met with minor frustration at focus from what I'm doing being directed at the newly loading application. Today I'd had enough and now I want this behavior stopped. There HAS to be a way to load a program in the background so it doesn't interfere with what I'm currently doing.
Friday, March 10, 2017 2:29 PM | 1 vote
I'd add that it's not just when typing something per your two scenarios. I also have that same experience, but I also experience the same annoyance+aggravation when using File Explorer to copy/rename/etc. files while another program may be starting. I'm trying to copy files by right-click or dragging and the other program steals focus then the files are trying to open or copy into the opening app... and some programs with long startup times (Photoshop) can steal focus like this multiple times. This must be stopped!! Please!!
Friday, March 10, 2017 4:45 PM | 2 votes
I was a developer on the Windows shell team at Microsoft during the Win7/Win8 time frame. I know they've thought a lot about this problem, but have ultimately punted on trying to do much more about it, because there's no way for the window manager to know whether an app is something the user wants to take activation or not. There's nothing in the architecture that can tie a specific window appearing back to a specific user-initiated launch of the app that window belongs to. Therefore it boils down to guesswork. For example, if I launch an app, and it finishes loading within 1 second, odds are very high that I expect that app to become the active window because I just launched it... it would be weird if I launched it and it didn't get activated. On the other hand, if the app takes 30 seconds to load, then odds are high that I went of to do something else and thus don't want it stealing activation. I believe their "solution" to this was basically to implement a time-based threshold between clicking on taskbar or start menu icons to launch an app and some new window appearing and requesting activation. But obviously any value you choose for the threshold isn't going to be perfect and is still going to annoy someone somewhere.
What they really need to do is build in more sensible logic like the following: "If user clicked an app launch icon, and window activation hasn't changed away from the explorer.exe process, and the user hasn't clicked on anything or pressed any keys anywhere inside the explorer.exe process, and a new window appears and asks for activation, then let it take activation. If a new window appears and asks for activation and it belongs to the process that already has the active window, let it take activation. Deny all other requests by any other windows to take activation, period."
Friday, March 10, 2017 5:08 PM | 2 votes
I was a developer on the Windows shell team at Microsoft during the Win7/Win8 time frame. I know they've thought a lot about this problem, but have ultimately punted on trying to do much more about it, because there's no way for the window manager to know whether an app is something the user wants to take activation or not. There's nothing in the architecture that can tie a specific window appearing back to a specific user-initiated launch of the app that window belongs to. Therefore it boils down to guesswork. For example, if I launch an app, and it finishes loading within 1 second, odds are very high that I expect that app to become the active window because I just launched it... it would be weird if I launched it and it didn't get activated. On the other hand, if the app takes 30 seconds to load, then odds are high that I went of to do something else and thus don't want it stealing activation. I believe their "solution" to this was basically to implement a time-based threshold between clicking on taskbar or start menu icons to launch an app and some new window appearing and requesting activation. But obviously any value you choose for the threshold isn't going to be perfect and is still going to annoy someone somewhere.
What they really need to do is build in more sensible logic like the following: "If user clicked an app launch icon, and window activation hasn't changed away from the explorer.exe process, and the user hasn't clicked on anything or pressed any keys anywhere inside the explorer.exe process, and a new window appears and asks for activation, then let it take activation. If a new window appears and asks for activation and it belongs to the process that already has the active window, let it take activation. Deny all other requests by any other windows to take activation, period."
The problem isn't focus stealing, per se. The problem is that focus is stolen from an unrelated window. I propose the following general rule of thumb: a child window should be allowed to steal focus from it's parent window, but no other focus stealing should be allowed. This is analogous to the way that a modal window can prevent input to it's parent window, but can't prevent input to a completely unrelated application. I'll lay out a couple of workflow examples to illustrate:
When I'm writing an email while photoshop starts in the another process, I don't want photoshop to steal focus from my email client. Because the 'parent' window of both my email client and photoshop would be the windows desktop, photoshop would not be allowed to steal focus from my email client.
When I've got a video player open, and click on the "open file" button, the video player will create a new dialog window to determine which file I want to open. This dialog window should absolutely steal focus from the main application window.
Friday, March 10, 2017 5:11 PM
I propose the following general rule of thumb: a child window should be allowed to steal focus from it's parent window, but no other focus stealing should be allowed.
That won't help for the special case of launching applications from explorer.exe (taskbar, start menu, Windows Explorer). The app windows are not child windows of explorer. So if you launched Notepad and it took 0.1s to load, it wouldn't take activation like you'd expect.
Friday, March 10, 2017 5:20 PM
I propose the following general rule of thumb: a child window should be allowed to steal focus from it's parent window, but no other focus stealing should be allowed.
That won't help for the special case of launching applications from explorer.exe (taskbar, start menu, Windows Explorer). The app windows are not child windows of explorer. So if you launched Notepad and it took 0.1s to load, it wouldn't take activation like you'd expect.
Good point.
In this case we have a parent process vs parent window dichotomy. If I launch an app from explorer, or launch a java applet from Chrome, or launch a GUI app from a terminal, the window owned by the parent process needs to give up focus to the window owned by the child process.
How about this rule: a window should only yield focus to a window belonging to its own process or a child process. That will solve the problem you've outlined while still preventing photoshop from stealing focus from my email client.
Friday, March 10, 2017 5:22 PM
a window should only yield focus to a window belonging to its own process or a child process
Then you're back to any app you launch from start menu, taskbar, or Windows Explorer being able to steal focus when its main window finally appears, so that doesn't solve anything.
Friday, March 10, 2017 5:28 PM
a window should only yield focus to a window belonging to its own process or a child process
Then you're back to any app you launch from start menu, taskbar, or Windows Explorer being able to steal focus when its main window finally appears, so that doesn't solve anything.
Under my proposed rule, when you launch the app from the start menu, the new window can steal focus from the desktop (it's own parent process). It isn't allowed to steal focus from a sibling window.
If a new window takes a long time to open, and you've moved on to another task, then the new window will open but not take focus.
Friday, March 10, 2017 5:32 PM
Under my proposed rule, when you launch the app from the start menu, the new window can steal focus from the desktop (it's own parent process). It isn't allowed to steal focus from a sibling window.
Under your proposal, if I launch Photoshop, then go launch the Start menu and start typing in a search, and then Photoshop finally appears while I'm in the middle of typing, the Start menu will get destroyed out from under me and I'll finish typing into Photoshop, triggering who-knows-what.
Friday, March 10, 2017 5:38 PM
Under my proposed rule, when you launch the app from the start menu, the new window can steal focus from the desktop (it's own parent process). It isn't allowed to steal focus from a sibling window.
Under your proposal, if I launch Photoshop, then go launch the Start menu and start typing in a search, and then Photoshop finally appears while I'm in the middle of typing, the Start menu will get destroyed out from under me and I'll finish typing into Photoshop, triggering who-knows-what.
Yes. Start menu is absolutely affected this way. It's still better than allowing unbounded focus stealing.
I'ts also a fixable problem. The way to fix this would be
- Microsoft made the start menu a child process of the Explorer process that instantiates the desktop, and
- The start menu uses a callback to it's parent (Explorer) process telling it to do... whatever the user told it to do. after the callback is made, the start menu window would need to close itself (though maybe I *want* to continue typing commands...)
This is a fix that Microsoft can make with minimal disruption, though.
Friday, March 10, 2017 5:40 PM
Yes. Start menu is absolutely affected this way.
Windows Explorer, taskbar, and anything else that runs in explorer.exe would suffer the same fate. There's a lot more stuff that runs in explorer.exe than most people realize.
Friday, March 10, 2017 5:44 PM
- Microsoft made the start menu a child process of the Explorer process that instantiates the desktop, and
- The start menu uses a callback to it's parent (Explorer) process telling it to do... whatever the user told it to do.
This is a fix that Microsoft can make with minimal disruption, though.
It's nowhere near as simple as you think. The start menu is not a separate process for many good reasons, not the least of which is performance. Also, the start menu and the Windows shell are highly extensible/pluggable architecture, with many apps and shell extensions hooking into places like the Start menu, which prevents Microsoft from changing architecture on a whim because it would break hundreds or even thousands of different third-party apps/extensions that are built around the current architecture in a variety of ways. There are weird corporate/IT requirements and usages, and foreign language/locale-specific things (such as the Input Method Editor, aka IME, for entering various composed glyphs), etc, that must be considered and cannot be broken by any change. The vast majority of folks have zero clue how unbelievably complicated it all is and how many scenarios and use cases there are and all the back-compat concerns. So no, what you're suggesting is not something that would be "minimal disruption", not by a long shot.
Friday, March 10, 2017 5:54 PM | 1 vote
To a large extent Explorer *is* windows. I agree that It does lots and lots of stuff.
I need to amend my proposed rule: A window should only yield focus to a window belonging to it's own process or a child process; or in response to an explicit user directive. (I forgot the part about users choosing windows...)
I still argue that my solution takes a universal problem of focus stealing and makes it into a problem that only affects Microsoft's Explorer. This can be fixed in-house at Microsoft by either carving out exceptions to the rule (bad code smell) or by restructuring to use callbacks to the "main" explorer process.
Heck, even if the problem with explorer wasn't fixed, I think it wouldn't be a huge deal to click on the icon of an exe file and have that program's window open out of focus. It would be annoying at times, and beneficial at others.
Friday, March 10, 2017 6:01 PM
It's nowhere near as simple as you think. The start menu is not a separate process for many good reasons, not the least of which is performance. Also, the start menu and the Windows shell are highly extensible/pluggable architecture, with many apps and shell extensions hooking into places like the Start menu, which prevents Microsoft from changing architecture on a whim because it would break hundreds or even thousands of different third-party apps/extensions that are built around the current architecture in a variety of ways. There are weird corporate/IT requirements and usages, and foreign language/locale-specific things (such as the Input Method Editor, aka IME, for entering various composed glyphs), etc, that must be considered and cannot be broken by any change. The vast majority of folks have zero clue how unbelievably complicated it all is and how many scenarios and use cases there are and all the back-compat concerns. So no, what you're suggesting is not something that would be "minimal disruption", not by a long shot.
Fair enough. I absolutely agree that the architecture is complicated, and I didn't mean to suggest that it should be changed without due testing and care.
However, taking a universal annoyance and bringing it "in house" by making it a microsoft-only problem is still an improvement. The phrase for this at my previous job was "DUET" meaning "Difficult for Us, Easy for Them". The idea was to bring problems in house where you could solve them; possibly with huge amounts of work, but hopefully with little or no disruption to end users or clients of your architecture.
Wednesday, March 15, 2017 3:57 PM
My problem with focus stealing was a little different than the topic here. I have never had any issues with programs I was intending to load, stealing focus in an annoying way. That all seemed fine to me. My problem was something was stealing focus in the background and it would do it for a second but it would mess up typing from time to time. I endlessly kept an eye on the task manager to see what program was stealing focus: dropbox? crashplan? but there was never a clear culprit. To cut to the chase, my solution was found when I ran a reliability report and saw that esif_assist_64.exe was failing every minute of everyday. This file is associated with Intel's Dynamic Platform and Thermal Framework and if you run a compatibility report on it, it's not compatible with windows 10. I tried rolling back the DPTF driver and running without the driver for a while, but what finally did the trick was deleting that file and replacing it with a dummy .exe file. I'm no tech whiz so there may be a more elegant way to do this, but here were my steps:
- Delete the file esif_assist_64.exe in C:\Windows\Temp\DPTF. Windows would initially not let me delete this, so I changed the file type to .pdf, and then windows would let me delete it
- Create a blank word doc or text file called esif_assist_64.docx in C:\Windows\Temp\DPTF.
- Change file type of document to .exe file
Voila, that should do it. My reliability report has been clean ever since, no more focus stealing once every minute of every day, and also my computer sleeps and screen turns off as prescribed in power settings.
Note: The first time I did this, I swear that on my next reboot that the file was replaced with the original (error) file when esif_uf.exe runs on startup. But after trying other things, I came back to this approach and yesterday did the above process, and today after two reboots, my dummy file is still intact (I knew which file was which because of file size: dummy file is 0kb but error file was ~240kb).
Hope this is helpful to somebody. Dell spent hours with me trying to figure it out and they still don't acknowledge or have ever addressed the esif_assist_64.exe file. But all I know is that now it works and nothing they did ever helped.
Wednesday, March 15, 2017 4:07 PM | 2 votes
Hi MadAdminManSau,
As -Mr Happy- pointed out, the best way is to identify the culprits and try to deal with them.
Since these services are starting without your permission, we could try clean boot to disable them from been running automatically or using Autorun tool to remove the entries.
How to perform a clean boot in Windows
https://support.microsoft.com/en-us/kb/929135Autoruns for Windows v13.51
https://technet.microsoft.com/en-us/sysinternals/bb963902.aspxBest regards
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].
This is no way a comprehensive or acceptable able answer to the originally-stated question.
Wednesday, March 15, 2017 4:07 PM | 2 votes
I too get affected by this, the Printer Management being one I notice the most with it sometimes takes awhile to bring up print properties due to third party drivers, then stealing the focus when it does. Most of the others I have learnt to live with, i.e. getting used to the timings etc.. Err, that was longer than my original planned 'no' response.
How To Prevent Programs From Stealing Focus in Windows is the only page I found that is kinda worth a read about identifying the culprits and trying to deal with them, or a couple of third party programs that may help. Also has a 'history' of how it worked with XP :)
This is no way a comprehensive or acceptable able answer to the originally-stated question.
Wednesday, March 15, 2017 4:07 PM
Hi MadAdminManSau,
As -Mr Happy- pointed out, the best way is to identify the culprits and try to deal with them.
Since these services are starting without your permission, we could try clean boot to disable them from been running automatically or using Autorun tool to remove the entries.
How to perform a clean boot in Windows
https://support.microsoft.com/en-us/kb/929135Autoruns for Windows v13.51
https://technet.microsoft.com/en-us/sysinternals/bb963902.aspxBest regards
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].
This is no way a comprehensive or acceptable able answer to the originally-stated question.
Wednesday, March 15, 2017 4:07 PM | 1 vote
I too get affected by this, the Printer Management being one I notice the most with it sometimes takes awhile to bring up print properties due to third party drivers, then stealing the focus when it does. Most of the others I have learnt to live with, i.e. getting used to the timings etc.. Err, that was longer than my original planned 'no' response.
How To Prevent Programs From Stealing Focus in Windows is the only page I found that is kinda worth a read about identifying the culprits and trying to deal with them, or a couple of third party programs that may help. Also has a 'history' of how it worked with XP :)
This is no way a comprehensive or acceptable able answer to the originally-stated question.
Thursday, May 11, 2017 5:04 PM
SOLUTION HERE. This worked in 2015 and it still works today as of 2017-05-11 with all the latest Windows 10 updates:
In Regedit (Hold down Start Button+R, then type regedit), change the HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout value from 0 to 30d40 . Save and restart the computer.
That will STOP FOCUS STEALING BY ALL APPLICATIONS. It would be nice if we can target specific applications, but I don't have time to figure out that hack. The above solution still significantly improved my Windows 10 experience.
Thursday, May 18, 2017 3:04 PM
Its not badly behaved applications. It happens with practically every application as it starts up. Its a matter of opening programs in background when they open. Something only the OS can enforce.
Or do it like Chrome does - tabs open in foreground by default but if you hold `Ctrl`, then they open in background.
But I have no hopes of Windows ever fixing this. Its just too small a thing. Users getting annoyed? Pfft. Who cares!
Friday, May 19, 2017 6:05 PM | 2 votes
I have this issue frequently, with various windows. The issue for me is that a modal dialog for some process with OK, Cancel, Accept, or other hotkeyed buttons will pop up while I am typing. I type quickly so the window will open, and I will have accepted... something... without ever having a chance to view what it was that I accepted, declined, canceled or otherwise. Here's a simple and easy solution. Allow me to select which window has focus. That doesn't mean you can't open a window or dialog, but I get to pick which one has focus at any given time. And it's not limited to program start up, or system start up (unless my laptop actually does take 3 hours to start, like I imagine it does.) I think this is the simplest solution, and often the easiest solution is the most elegant. Want to flash the task bar to let me know that a window requires, or requests, my attention? Great. Do that. Taking the focus from an active window to put focus on another window? Not cool.
Sunday, June 4, 2017 8:30 PM
This is already set to 30d40 and it's still happening to me.
Seems officebackgroundtaskhandler process is the culprit in this case as I ran a tool to capture/record whatever grabs foreground focus (look up Windows Focus Logger) - keeps alt-tabbing me to Windows in the middle of gaming.
Friday, June 9, 2017 5:02 PM
SOLUTION HERE. This worked in 2015 and it still works today as of 2017-05-11 with all the latest Windows 10 updates:
In Regedit (Hold down Start Button+R, then type regedit), change the HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout value from 0 to 30d40 . Save and restart the computer.
That will STOP FOCUS STEALING BY ALL APPLICATIONS. It would be nice if we can target specific applications, but I don't have time to figure out that hack. The above solution still significantly improved my Windows 10 experience.
I tried this solution, and while it does not stop 100% of applications from stealing focus, it's considerably better.
As an Architect (the physical world type) I've been looking for a solution for stealing focus for years. The design software we use takes 2-4 minutes to load. Plus, there are third party add-ins that also load during this process stealing focus as each one loads within that 2-4 minutes. Those 2-4 minutes is valuable time to multitask, like responding to emails. It practically impossible to draft an email because of the stealing focus.
There are roughly 100,000 licensed architects in the country opening this software 2-3 times a day. That's 870,000 hours a year of lost productivity due to this issue alone.
Friday, June 16, 2017 2:44 AM
There is no ForegroundLockTimeout in that menu..
Monday, July 10, 2017 4:30 PM | 1 vote
check the values not the keys
I would like to thank MS for posting a completely useless and inaccurate answer then marking it solved when it was not
Kate Li and MeipoXu must want points and a pat on the back from their bosses
YOUR SOLUTION DOES NOT WORK!
Thursday, July 27, 2017 7:37 AM
Photoshop made me google turning off focus stealing too. Can't launch it and then check my inbox because of this (Windows should allow turning this off but I don't know why apps request focus anyways if that's how this works).
Thursday, July 27, 2017 8:20 PM
I have this issue frequently, with various windows. The issue for me is that a modal dialog for some process with OK, Cancel, Accept, or other hotkeyed buttons will pop up while I am typing. I type quickly so the window will open, and I will have accepted... something... without ever having a chance to view what it was that I accepted, declined, canceled or otherwise. Here's a simple and easy solution. Allow me to select which window has focus. That doesn't mean you can't open a window or dialog, but I get to pick which one has focus at any given time. And it's not limited to program start up, or system start up (unless my laptop actually does take 3 hours to start, like I imagine it does.) I think this is the simplest solution, and often the easiest solution is the most elegant. Want to flash the task bar to let me know that a window requires, or requests, my attention? Great. Do that. Taking the focus from an active window to put focus on another window? Not cool.
Count me as another having these problems. Another option is to use the "idle" state as the OS does when determining when to start the screensaver. If the OS is not currently (or within 500ms) idle then do NOT steal focus. If it is currently idle then go ahead and steal focus.
Saturday, August 19, 2017 9:12 AM | 2 votes
Is this not a priority for MS!?
Beyond comprehension.
I am nearly CONSTANTLY interrupted by this OS "BUG".
I am a software engineer, BS in computer science + 13 years solid professional experience at Intel, Sony, and multiple games companies.
This bug is just unacceptable. It's been a bug in MS products since the day they implemented task switching. I am dumbfounded as to why this has never been a MS priority to fix.
I too lose a good number of hours each day dealing with focus stealing. I work maybe 20 times, or more, faster than all these apps trying to task switch automatically, so I hit the "typing in one window, OS/app focus steal, botched up application use" all the time. On average, maybe 5 - 100 times in one day. That's a lot of frustration while I'm just trying to calmly work.
The worst for me is when I'm typing in one window, hitting Enter for carriage-return, and another window has just popped up asking for Cancel or OK. I've had countless installs, apps, processes, etc. screwed up by this OS bug during these types of situations.
Microsoft, do we have to wait for 2100 for this bug fix, or what?
Please fix ASAP.
Regards,
Slave to MS products,
Ryan Favale
Monday, September 11, 2017 12:02 PM | 1 vote
This is a bad problem in MS Windows OS. It is old and we're all used to it. But its still stupidly annoying, dangerous and bad.
How is it reasonable for a popup messagebox to steal keyboard focus while you are typing in another window?
For example, you may be writing an email and hit Enter for a new line, and just at that moment there is a popup that says something like "do you want to delete everything?" and it steals your Enter keypress, now you don't even know what happened, you didn't have time to read the unexpected popup message or see where the keyboard focus was when you hit Enter, and you may not even know what you've been tricked into clicking.
The solution is simple dear Microsoft. Never steal keyboard focus. You can put a window on top to make it visible, but NEVER steal keyboard focus. Even for a global modal dialog it is simple to solve, don't make the button active by default so the stray Enter keypress will have no effect.
Please just fix it. Please?
Thanks