News for hackers. Stuff that matters.
Re:Ask HN: Who has had a successful PWA product? by palsecam on Friday June 21, 2024 @04:20AM (#40747350)
OK, finally found a fix:

  /*
    Work around Firefox Mobile getting the hit target (clickable area)
    of the game control buttons wrong, when the (bottom) navigation bar
    gets hidden (when scrolling down).
    
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1813213
    and https://stackoverflow.com/questions/70893056/mozilla-android-addressbar-conflict-with-sticky-button-on-bottom
    and https://news.ycombinator.com/item?id=40733062 ← thanks @ttymck for the bug report!
  */
  if (/Mobile.+Firefox/.test(navigator.userAgent)) {
    self.addEventListener('resize', frameThrottle1(() => {
      document.getElementById('metagame').style.position = (window.outerHeight > window.innerHeight)
        ? 'sticky'
        : 'fixed';
    }));
  }

There are no comments on this comment yet.