This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23271 - confusing and unclear text about system focus and document focus
Summary: confusing and unclear text about system focus and document focus
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 07:33 UTC by Jon Piesing (OIPF)
Modified: 2013-10-22 23:46 UTC (History)
3 users (show)

See Also:


Attachments

Description Jon Piesing (OIPF) 2013-09-18 07:33:15 UTC
I have been trying to understand what the DOM3 events specification requires concerning sending focus and blur events to a document that has focus in the browser when the browser itself gains and loses system focus. The most relevant text I can see in the DOM3 events specification is the following text, under the heading "Document Focus and Focus Context". 

"This event module includes event types for notification of changes in document focus. Depending on the environment, document focus MAY be distinct from user agent focus and operating system focus. This is referred to as focus context. For example, in a typical desktop browser environment, the operating system context focus might be on one of many different applications, one of which is the browser. When the browser has focus, the user can shift the application context focus (such as with the tab key) among different browser user interface fields (e.g., the Web site location bar, a search field, etc.) before or after achieving document focus. Once the document itself has focus, sequential shifting of focus will step through the focusable elements in the document. The event types defined in this specification deal exclusively with document focus, and the event target identified in the event details MUST only be part of the document or documents in the window, never a part of the browser or operating system, even when switching from one focus context to another."

This paragraph is confusing and hard to read however it is not clear whether changes in operating system focus and/or application focus within the browser would generate focus and blur events when those changes involve the document.

On the surface, the text in the last sentence saying "The event types defined in this specification deal exclusively with document focus" is very clear. However there's no definition of "document focus" and the second sentence says "Depending on the environment, document focus MAY be distinct from user agent focus and operating system focus." Together these make the apparently clear statement in the last paragraph in fact anything but clear.

If a document has focus within the browser and the browser gains and loses system focus, that would seem to meet the requirement in the last sentence that "the event target identified in the event details MUST only be part of the document or documents in the window, never a part of the browser or operating system".

Please can this text be made clearer about what is intended concerning focus and blur events under these conditions.