<?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>19917</bug_id>
          
          <creation_ts>2012-11-09 08:52:59 +0000</creation_ts>
          <short_desc>Split fullscreenchange event into two separate events</short_desc>
          <delta_ts>2012-11-09 18:44:34 +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>Fullscreen</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hao Jing">jh.jinghao</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bugs</cc>
    
    <cc>cpearce</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78090</commentid>
    <comment_count>0</comment_count>
    <who name="Hao Jing">jh.jinghao</who>
    <bug_when>2012-11-09 08:52:59 +0000</bug_when>
    <thetext>We have defined fullscreenchange event to capture the change of fullscreen (http://www.w3.org/TR/fullscreen/), but in some cases web app needs to know if the document is entering fullscreen or exiting fullscreen. For example, the web app wants to do some operation such as hide some elements or pop up an alert dialog to user when the document is exiting fullscreen , but only applying fullscreenchange event cannot make the app to be sure the document is exiting fullscreen unless web developer provide a trick, such as set a flag to mark the document&apos;s status(in fullscreen or out of fullscreen).

Therefore, can we split the &quot;fullscreenchange&quot; event to two separate events? One is &quot;fullscreenenter&quot; event which will be invoked when the document is entering fullscreen, another is &quot;fullscreenexit&quot; event which will be invoked when the document is exiting fullscreen. With those two events web developer can create app easily to distinguish condition of entering or exiting fullscreen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78091</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-11-09 08:57:56 +0000</bug_when>
    <thetext>for the reference, latest spec is in http://fullscreen.spec.whatwg.org/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78092</commentid>
    <comment_count>2</comment_count>
    <who name="Hao Jing">jh.jinghao</who>
    <bug_when>2012-11-09 09:08:04 +0000</bug_when>
    <thetext>Thanks Olli,I review the spec you provide, there is still one fullscreenchange event,no new event is defined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78093</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-11-09 09:18:31 +0000</bug_when>
    <thetext>yup, though I wonder why .fullscreenElement isn&apos;t enough for your use case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78096</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-09 09:33:15 +0000</bug_when>
    <thetext>Yes, fullscreenElement is meant to address this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78141</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Pearce">cpearce</who>
    <bug_when>2012-11-09 18:44:34 +0000</bug_when>
    <thetext>When you receive a &quot;fullscreenchange&quot; event, check document.fullscreenElement, If it&apos;s non-null, the user is in fullscreen mode. If it&apos;s null, the user has exited fullscreen. Is that sufficient for your needs?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>