title: React chrome full screen delete function F11 and X
body: <p>I created a web app in react that expands to internal screen after a user 's action with this simple condition:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const onClickButton = () =&gt;{
    if (screenfull.isEnabled) {
        screenfull.request();
      }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>my whole app is now in full screen, but if the 'user presses F11 or the X key in the middle of the web page it comes out of full screen mode without restoring it.</p>
  <p>I have tried saving the boolean value of screenfull.isEnabled in a state and with useEffect (with dependency the state screenfull.isEnabled) to make the internal screenfull reset but it does not work.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> const [FullScreen, setFullScreen] = useState(screenfull.isEnabled);
  
    useEffect(() =&gt; {
      if (!FullScreen) {
        screenfull.request();
      }
    }, [FullScreen]);</code></pre>
  </div>
  </div>
  </p>
  <p>Can anyone help me?</p>