Re:Ask HN: Who has had a successful PWA product?
by ttymck on Wednesday June 19, 2024 @06:24PM
(#40733062)
Your buy a coffee link was not clickable on Firefox Android
[ Parent
| on HN ]
Re:Ask HN: Who has had a successful PWA product?
by palsecam on Thursday June 20, 2024 @07:33AM
(#40737455)
Oh thank you for that! Could reproduce that bug.
It’s because of https://bugzilla.mozilla.org/show_bug.cgi?id=1813213
I just spent a couple hours trying to find a clean workaround, without success… Will investigate more ASAP.
Thanks again!
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';
}));
}