4

How do I get a vertical scrollbar in fullscreen mode in Internet Explorer 11 with fullscreen API? Internet Explorer 11.0.9600.18163 Windows 7

I tried the following:

<!DOCTYPE html>
<html>
<head>
  <script type="text/javascript">
    window.onload = function(){
      function makeFullscreen() {
        console.log("makeFullscreen");
        document.documentElement.msRequestFullscreen();
      }

      function exitFullscreen() {
        document.msExitFullscreen();
      }

      document.getElementById("fullscreen").onclick = makeFullscreen;
      document.getElementById("exitFullscreen").onclick = exitFullscreen;
    }
  </script>
  <style>
    div {
      width: 200px;
      height: 3000px;
      background-color: red;
    }

    :-ms-fullscreen {
      overflow: scroll;
    }
  </style>
</head>
<body>
  <button type="button" id="fullscreen">
    make fullscreen
  </button>
  <button type="button" id="exitFullscreen">
    exit fullscreen
  </button>
  <div>
    great div
  </div>
</body>
</html>

I checked the following examples:

njm
  • 51
  • 6
  • Welcome to Stack Overflow. It may be helpful to see a more complete example of your code or include a jsFiddle that you're using for testing. It's not clear if you;re trying to make use of IE's built in scrollbar or making your own for a `div`. Needs more example code. – Twisty Jan 18 '16 at 19:53
  • @Twisty: Thanks. Fullscreen in jsFiddle did not work at all (https://jsfiddle.net/s3nqcvu1/), so I posted the code in the question. – njm Jan 22 '16 at 15:45
  • Duplicate question: https://stackoverflow.com/questions/33562396/can-not-scroll-body-while-fullscreen-is-enabled-in-ms-ie11 – user3553031 Jan 07 '17 at 05:13

0 Answers0