title: On Mobile why pageYOffset + clientHeight don't equal to scrollHeight?
body: <p>For some reason on mobile devices (iPhone X for concretely) I got some magic with coords, where the full page height based on page's <code>offset</code> + <code>current</code> heights sum don't equal to the main document value:</p>
  
  <pre><code>const fullHeight = window.pageYOffset + document.documentElement.clientHeight
  
  fullHeight !== document.documentElement.scrollHeight // why?
  </code></pre>
  
  <p>For example:</p>
  
  <p><code>console.log(document.documentElement.clientHeight) // 635</code>
   <code>console.log(window.pageYOffset) // 905</code>
   <code>console.log(document.documentElement.scrollHeight) // 1675 !== (635 + 905)</code></p>
  
  <p>Sum:
  635 + 905 => 1540 !== 1675</p>
  
  <p>I found that something hidden adds extra height to the <code>clientHeight</code> value. This happens only on mobile (tested on iPhone X os13, Chrome + Safari), btw on the desktop all works fine as expected, why...</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I've made some fast solution to deal with this magic and be notified once we hit the bottom of the page:</p>
  
  <pre><code>    const fullPageHeight = document.documentElement.scrollHeight
      const scrollTop = window.pageYOffset
      const currentScreenHeight = fullPageHeight - scrollTop
  
      const isBottomNotHit = currentScreenHeight + scrollTop !== fullPageHeight
  </code></pre>
  
  <p>It works well on both mobile and desktop devices though. </p>