Focus stealing

Last updated

In computing, focus stealing is a mode error occurring when a program not in focus (e.g. minimized or operating in background) places a window in the foreground and redirects all keyboard input to that window. This is considered to be an annoyance or hazard to some users because the program may steal the focus while the user is typing, causing keystrokes to go to the newly focused window, possibly being lost or causing an unintended effect therein. This may be a few keystrokes due to reaction time, or may be more if the user's attention is not on the computer screen, e.g. typing while looking at the keyboard or while reading copy to the side, or if processor lag causes a delay (sometimes of several seconds) between the focus stealing event and the newly focused window displaying on the screen.

Contents

Security issues

Focus stealing can cause damage, as users may, while typing when their attention is away from the screen, inadvertently agree to a program doing something that causes damage. For example, when Microsoft Windows pops up the Disk Cleanup wizard, the user may "agree" to deleting files without realizing that the wizard was waiting for input. Focus stealing can also on occasion cause security breaches, for example, when a user enters a password and the typed password appears instead in a new instant-messaging window in an unmasked input field.

Alternatives to focus stealing

There are a number of alternative methods for grabbing the attention of the user that can be used instead of focus stealing: [1]

  1. Pulse the application's icon in the task bar, leaving the application in the background
  2. Output a message to the notification area
  3. Pulsate the display over scan area
  4. Use an audible alerting framework

Affected systems

X Window Managers

The following window manager systems allow focus stealing:

Microsoft Windows

Microsoft Windows-based systems use pop-up dialogue boxes which can steal focus from the current application. On versions of Microsoft Windows prior to Windows 7, there is a user setting that will by default prevent a cooperative application from stealing focus when launching another program or popping up a new window or dialogue box. [2] This same method does not work in Windows 7 or later. [3]

MacOS X

Apple MacOS X systems also switch applications from background to foreground when the background applications uses pop-up modal dialogs. Example of this behavior is Google Chrome using alert dialog, as documented in [4]

Web browsers

The following web browsers allow focus stealing via a this.focus() JavaScript facility:

Focus-stealing detection programs

Programs have been written to identify what is stealing focus.

See also

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2023, 98.7% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

<span class="mw-page-title-main">Web browser</span> Software used to navigate the internet

A web browser is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on a range of devices, including desktops, laptops, tablets, and smartphones. In 2020, an estimated 4.9 billion people have used a browser. The most used browser is Google Chrome, with a 65% global market share on all devices, followed by Safari with 18%.

<span class="mw-page-title-main">Keystroke logging</span> Action of recording the keys struck on a keyboard

Keystroke logging, often referred to as keylogging or keyboard capturing, is the action of recording (logging) the keys struck on a keyboard, typically covertly, so that a person using the keyboard is unaware that their actions are being monitored. Data can then be retrieved by the person operating the logging program. A keystroke recorder or keylogger can be either software or hardware.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

In user interface design for computer applications, a modal window is a graphical control element subordinate to an application's main window.

<span class="mw-page-title-main">Window manager</span> Type of system software

A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunction with the underlying graphical system that provides required functionality—support for graphics hardware, pointing devices, and a keyboard—and are often written and created using a widget toolkit.

<span class="mw-page-title-main">Button (computing)</span> Graphical user interface element

In computing, a button is a graphical control element that provides the user a simple way to trigger an event, like searching for a query at a search engine, or to interact with dialog boxes, like confirming an action.

This is a comparison of both historical and current web browsers based on developer, engine, platform(s), releases, license, and cost.

<span class="mw-page-title-main">Netscape Browser</span> Internet browser

Netscape Browser is the eighth major release of the Netscape series of web browsers, now all discontinued. It was published by AOL, but developed by Mercurial Communications, and originally released for Windows on May 19, 2005.

DOM Events are a signal that something has occurred, or is occurring, and can be triggered by user interactions or by the browser. Client-side scripting languages like JavaScript, JScript, VBScript, and Java can register various event handlers or listeners on the element nodes inside a DOM tree, such as in HTML, XHTML, XUL, and SVG documents.

<span class="mw-page-title-main">Comparison of command shells</span>

A command shell is a command-line interface to interact with and manipulate a computer's operating system.

Mozilla Firefox has features that allow it to be distinguished from other web browsers, such as Chrome and Internet Explorer.

Netscape Plugin Application Programming Interface (NPAPI) was an application programming interface (API) of the web browsers that allows plugins to be integrated.

<span class="mw-page-title-main">Mozilla Application Suite</span> Discontinued Internet suite

The Mozilla Application Suite is a discontinued cross-platform integrated Internet suite. Its development was initiated by Netscape Communications Corporation, before their acquisition by AOL. It was based on the source code of Netscape Communicator. The development was spearheaded by the Mozilla Organization from 1998 to 2003, and by the Mozilla Foundation from 2003 to 2006.

<span class="mw-page-title-main">Crash reporter</span> System software that identify and report crash details

A crash reporter is usually a system software whose function is to identify reporting crash details and to alert when there are crashes, in production or on development / testing environments. Crash reports often include data such as stack traces, type of crash, trends and version of software. These reports help software developers- Web, SAAS, mobile apps and more, to diagnose and fix the underlying problem causing the crashes. Crash reports may contain sensitive information such as passwords, email addresses, and contact information, and so have become objects of interest for researchers in the field of computer security.

<span class="mw-page-title-main">Features of the Opera web browser</span> List of software application features

This article details features of the Opera web browser.

A number of computer operating systems employ security features to help prevent malicious software from gaining sufficient privileges to compromise the computer system. Operating systems lacking such features, such as DOS, Windows implementations prior to Windows NT, CP/M-80, and all Mac operating systems prior to Mac OS X, had only one category of user who was allowed to do anything. With separate execution contexts it is possible for multiple users to store private files, for multiple users to use a computer at the same time, to protect the system against malicious users, and to protect the system against malicious programs. The first multi-user secure system was Multics, which began development in the 1960s; it wasn't until UNIX, BSD, Linux, and NT in the late 80s and early 90s that multi-tasking security contexts were brought to x86 consumer machines.

<span class="mw-page-title-main">Google Chrome</span> Web browser developed by Google

Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, and also for Android, where it is the default browser. The browser is also the main component of ChromeOS, where it serves as the platform for web applications.

Control-Alt-Delete is a computer keyboard command on IBM PC compatible computers, invoked by pressing the Delete key while holding the Control and Alt keys: Ctrl+Alt+Delete. The function of the key combination differs depending on the context but it generally interrupts or facilitates interrupting a function. For instance, in pre-boot environment or in MS-DOS, Windows 3.0 and earlier versions of Windows or OS/2, the key combination reboots the computer. Starting with Windows 95, the key combination invokes a task manager or security related component that facilitates ending a Windows session or killing a frozen application.

Browser security is the application of Internet security to web browsers in order to protect networked data and computer systems from breaches of privacy or malware. Security exploits of browsers often use JavaScript, sometimes with cross-site scripting (XSS) with a secondary payload using Adobe Flash. Security exploits can also take advantage of vulnerabilities that are commonly exploited in all browsers.

References

  1. Documentation released by Mark Hobley via the computer accessibility wiki
  2. "ForegroundLockTimeout". Microsoft TechNet. Microsoft Corporation. Retrieved 18 November 2015.
  3. "Preventing applications from stealing focus". superuser.com. Stack Exchange Inc. Retrieved 18 November 2015.
  4. "Tabs can steal focus using alert/prompt/confirm popups". bugs.chromium.org. Retrieved 25 April 2016.
  5. Mozilla Focus Stealing bugs