<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26934</bug_id>
          
          <creation_ts>2014-09-29 23:47:53 +0000</creation_ts>
          <short_desc>[Shadow]: How should Element.requestPointerLock() work in shadow DOM?</short_desc>
          <delta_ts>2015-07-06 08:17:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>26365</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Olli Pettay">bugs</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>scheib</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112433</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-09-29 23:47:53 +0000</bug_when>
    <thetext>Currently requestPointerLock requires element to be in Document, but Chromium
does let one to lock pointer to a shadow dom element too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112470</commentid>
    <comment_count>1</comment_count>
    <who name="">scheib</who>
    <bug_when>2014-09-30 15:38:41 +0000</bug_when>
    <thetext>There&apos;s nothing fundamentally wrong with pointer lock targeting any element. Specifying the element must be in the document easily handles any kind of navigation concerns (where lock must be released) and dismiss any open ended questions about where events are headed if elements aren&apos;t in the document.

Here are the relevant sections of Pointer Lock:

&quot;&quot;&quot;
5.1 Methods

requestPointerLock

...

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&apos;s window manager. 

...

8 Requirements

Pointer lock must be exited 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.
&quot;&quot;&quot;


And here is a draft of a change to add shadow tree/host to the sections:

&quot;&quot;&quot;
5.1 Methods

requestPointerLock

...

Pointer lock must succeed only if the target is in the active document (or a shadow tree of a shadow host 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&apos;s window manager. 

...

8 Requirements

Pointer lock must be exited if any of the follow occur:
- The target is removed from its document.
- The target is removed from its shadow tree.
- 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.
&quot;&quot;&quot;

Review &amp; comments please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112471</commentid>
    <comment_count>2</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-09-30 15:49:09 +0000</bug_when>
    <thetext>&gt; 5.1 Methods
&gt; 
&gt; requestPointerLock
&gt; 
&gt; ...
&gt; 
&gt; Pointer lock must succeed only if the target is in the active document (or a
&gt; shadow tree of a shadow host in the active document)
We probably don&apos;t want elements in older shadow trees which aren&apos;t projected to newer shadow trees to
be able to lock the pointer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121751</commentid>
    <comment_count>3</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 08:17:09 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/192</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>