On Fri, Mar 15, 2013 at 5:24 PM, Vincent Scheib <sch...@google.com> wrote:
> After discussion with Olli Pettay I have clarified portions of the pointer > lock specification. > > https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html > https://dvcs.w3.org/hg/pointerlock/diff/6543d83c0b74/index.html > > When requesting pointer lock, this paragraph replaces previous statements > regarding the target being in the DOM tree. > """ > Pointer lock must succeed only if the target is in the active document of > a browsing context which is (or has an ancestor browsing context which is) > in focus by a window which is in focus by the operating system's window > manager. The target element and its browsing context need not be in focus. > """ > > In Requirements, clarification was added that focus MAY be shifted out of > a document and into others without exiting lock: > """ > The Pointer Lock API must exit the pointer lock state if the target is > removed from its document, or the user agent, window, or tab loses focus. > Moving focus between elements of active documents, including between > browsing contexts, does not exit pointer lock. E.g. using the keyboard to > move focus between contents of frames or iframes will not exit. > """ > > Feedback and suggestions welcome. > Why would pointer lock care about focus? If the browsing context doesn't have focus, pointer lock may be released at the system level, but that should be transparent to the page and reestablished automatically if the user returns. Pages shouldn't need to care about this. This is the same as fullscreen--obviously a page shouldn't be forced out of fullscreen if the user switches to another tab or application, unless that's the system convention (which it isn't on any platform I know of). (By the way, if a web specification finds itself talking about "windows" or "window managers" or "tabs" normatively, something is probably wrong. Interfaces at a higher abstraction level than browsing contexts are implementation details. Please see http://www.whatwg.org/specs/web-apps/current-work/#dom-document-hasfocusfor platform-independent language.) -- Glenn Maynard