{"id":997,"date":"2007-12-05T10:42:36","date_gmt":"2007-12-05T15:42:36","guid":{"rendered":"http:\/\/www.starkeith.net\/coredump\/2007\/12\/05\/dont-steal-the-focus\/"},"modified":"2012-12-18T10:32:41","modified_gmt":"2012-12-18T15:32:41","slug":"dont-steal-the-focus","status":"publish","type":"post","link":"https:\/\/www.starkeith.net\/coredump\/2007\/12\/05\/dont-steal-the-focus\/","title":{"rendered":"Don&#8217;t Steal the Focus"},"content":{"rendered":"<p>Jeff Atwood made a wonderful post the other day called <a href=\"http:\/\/www.codinghorror.com\/blog\/archives\/001011.html\">Please Don&#8217;t Steal My Focus<\/a>, and I have to say I wholeheartedly agree with him.<\/p>\n<p>Of course, the question that is raised is &#8220;why are programs still doing this?&#8221; My pick for &#8220;worst offender&#8221; is, ironically, Microsoft Word. When you open Word, it forces itself as the topmost window and steals your focus. Try opening a bunch of files (say, across a slow network connection) and switch to another window and try to get some work done. You won&#8217;t be able to &#8211; because as each document opens, Word pops up as the topmost window with the focus. Thanks, Microsoft, for ignoring your own guidelines:<\/p>\n<blockquote><p>&#8220;The strange thing is, there are provisions built into the operating system to protect us from badly written, focus stealing applications. The ForegroundLockTimeout registry setting is expressly designed to prevent applications from stealing focus from the user. The OS silently converts that inappropriate focus stealing behavior into friendlier, less invasive taskbar button flashing, which is the subject of the ForegroundFlashCount registry setting.&#8221;<\/p><\/blockquote>\n<p>Indeed. That&#8217;s why, when I need to notify the user of something, I use a notification balloon. It&#8217;s much less intrusive and (best of all) it doesn&#8217;t steal the focus. (Plus, it looks cool.) And when you must pop up a modal dialog box and steal the user&#8217;s focus (only acceptable in response to an action the user has made <em>in your own program<\/em> of course), I make sure that there are NO default buttons and NO one-key shortcuts. That way, someone typing won&#8217;t accidentally close, cancel, or delete something just by typing. They&#8217;d have to either use the tab\/arrow keys, or use an ALT+Letter combo.<\/p>\n<p>Perhaps Microsoft will fix this behavior in the next version of Word, but I&#8217;m not holding my breath. As for anyone else who abuses this power&#8230; shame on you!<\/p>\n<p><strong>UPDATE:<\/strong> <a href=\"http:\/\/www.starkeith.net\/coredump\/2007\/12\/06\/on-the-other-hand-or-dont-steal-the-focus-part-2\/\" title=\"On the other hand - or, don't steal the focus: part 2\">Follow-up here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jeff Atwood made a wonderful post the other day called Please Don&#8217;t Steal My Focus, and I have to say I wholeheartedly agree with him. Of course, the question that is raised is &#8220;why are programs still doing this?&#8221; My pick for &#8220;worst offender&#8221; is, ironically, Microsoft Word. When you open Word, it forces itself&hellip; <a class=\"more-link\" href=\"https:\/\/www.starkeith.net\/coredump\/2007\/12\/05\/dont-steal-the-focus\/\">Continue reading <span class=\"screen-reader-text\">Don&#8217;t Steal the Focus<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[5],"tags":[100,97],"class_list":["post-997","post","type-post","status-publish","format-standard","hentry","category-technology","tag-opinion","tag-software","entry"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pimUj-g5","jetpack-related-posts":[{"id":999,"url":"https:\/\/www.starkeith.net\/coredump\/2007\/12\/06\/on-the-other-hand-or-dont-steal-the-focus-part-2\/","url_meta":{"origin":997,"position":0},"title":"On The Other Hand &#8211; or, Don&#8217;t Steal the Focus: Part 2","author":"Keith Survell","date":"December 6, 2007","format":false,"excerpt":"Touching again on the whole topic of \"don't steal the focus,\" I thought I'd point out that the Microsoft Windows Vista User Experience Guidelines has an entire section just on Error Messages, and wouldn't you know... they advise you not to steal the focus from the user. Although they may\u2026","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1331,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/09\/18\/microsoft-admits-what-went-wrong-with-vista-and-how-they-fixed-it\/","url_meta":{"origin":997,"position":1},"title":"Microsoft Admits What Went Wrong with Vista, and How They Fixed It","author":"Keith Survell","date":"September 18, 2008","format":false,"excerpt":"When I first read this headline, I turned and looked to see if any flying pigs were going by my window. But no! It's real! And, surprisingly, it's honest. Executed properly, UAC could have been a savior for people wont to install every application they find. Unfortunately, the UAC prompts\u2026","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4149,"url":"https:\/\/www.starkeith.net\/coredump\/2013\/02\/15\/third-and-final-look-at-windows-8\/","url_meta":{"origin":997,"position":2},"title":"A Third (and Final) Look at Windows 8","author":"Keith Survell","date":"February 15, 2013","format":false,"excerpt":"After living with Windows 8 for a full 6 months, it's time to take a measured final look at Microsoft's ambitious attempt to merge the desktop & tablet OS.","rel":"","context":"In &quot;My Opinion&quot;","block_context":{"text":"My Opinion","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-opinion\/"},"img":{"alt_text":"windows 8","src":"https:\/\/i0.wp.com\/www.starkeith.net\/coredump\/wp-content\/uploads\/\/2012\/08\/windows-8.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1520,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/11\/20\/telescope-tale\/","url_meta":{"origin":997,"position":3},"title":"Telescope Tale","author":"Keith Survell","date":"November 20, 2008","format":false,"excerpt":"This is a story about a stupid mistake. I'm sure that many people who read this story will figure out the mistake before I get to the end, but needless to say, I didn't figure it out, and neither did 3 other camera\/telescope experts. So, perhaps there are other people\u2026","rel":"","context":"In &quot;My Life&quot;","block_context":{"text":"My Life","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-life\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":965,"url":"https:\/\/www.starkeith.net\/coredump\/2007\/11\/05\/insane-password-policy\/","url_meta":{"origin":997,"position":4},"title":"Insane Password Policy","author":"Keith Survell","date":"November 5, 2007","format":false,"excerpt":"One of the most insane password policies I have ever seen comes from... Microsoft?","rel":"","context":"In &quot;Pictures&quot;","block_context":{"text":"Pictures","link":"https:\/\/www.starkeith.net\/coredump\/category\/pictures\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1056,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/03\/03\/focus-focus\/","url_meta":{"origin":997,"position":5},"title":"Focus&#8230; Focus!","author":"Keith Survell","date":"March 3, 2008","format":false,"excerpt":"I've been fiddling around with my camera again lately, and my feature-of-fiddling has been aperture, as it relates to the focus of the camera. Like a lot of people who get into photography (or so I assume), it's a little mind-bending at first with all the terms... focal length, depth\u2026","rel":"","context":"In &quot;Pictures&quot;","block_context":{"text":"Pictures","link":"https:\/\/www.starkeith.net\/coredump\/category\/pictures\/"},"img":{"alt_text":"lettuce closeup","src":"https:\/\/i0.wp.com\/farm3.static.flickr.com\/2236\/2303305594_0a3a224749.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/comments?post=997"}],"version-history":[{"count":0,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/997\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/media?parent=997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/categories?post=997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/tags?post=997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}