Сохранить скролинг на полном экране

document.addEventListener("DOMContentLoaded", function() {
   b.onclick = e => (document.fullscreenElement ? document.exitFullscreen() : document.body.requestFullscreen())
});
*{
  position: relative;
  padding:0;
  margin:0;
  outline: none;
  letter-spacing: 1px;
  box-sizing:border-box;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: rgba(0,0,0,0)
}

body {height: 2500px; background: #000}
#b {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size:20px;
  height: 500px;
  background: red;
}
<body>
  <div id='b'>Клик</div>
</body>

Когда кликаем по красному квадрату и разворачиваем блок body на весь экран. Как при этом возможно сохранить скролинг документа?


Ответы (0 шт):