W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: Pointer lock updated with clarification of lock and focus requirements.

From: Glenn Maynard <glenn@zewt.org>
Date: Sat, 16 Mar 2013 09:51:13 -0500
Message-ID: <CABirCh-66oZh-QLrWObENAeWuBG1YEBGGitQpM-8fhxk_txioA@mail.gmail.com>
To: Vincent Scheib <scheib@google.com>
Cc: Webapps WG <public-webapps@w3.org>, Olli Pettay <Olli.Pettay@helsinki.fi>
On Fri, Mar 15, 2013 at 5:24 PM, Vincent Scheib <scheib@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
Received on Saturday, 16 March 2013 14:51:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:58 GMT