Cheers. I'll try the new tab workaround
Tesseract
Tesseract: An Advanced Lemmy Client
The goal of Tesseract is to address as many things in Lemmy that annoy me as I can. I also trawl various "is there any way to [blank] in Lemmy?" posts to get feature ideas. Both of those lists are pretty extensive, so Tesseract has accumulated quite a few features.
Github: https://github.com/asimons04/Tesseract/
Hosted / Demo Instance: https://tesseract.dubvee.org
Note that the hosted instance defaults to Lemmy World, but it is unlocked to be able to connect to any Lemmy server.
Announcements, support, and guidance for the Tesseract UI.
All instance rules apply here. Beyond that, just be civil and constructive.
Should work for you. I confirmed that this isn't just FF on Android but any browser on any platform.
Also, FYI: If you want to set "open links in new tab" as the default option as a global workaround for everyone, you can set an environment variable in the docker-compose file:
...
environment:
- ...
- PUBLIC_OPEN_LINKS_NEW_TAB=true
...
That will set the default option in user settings for all new sessions (if there's no settings stored to localStorage yet, that is). Users can still disable it, this just sets the default value for that setting (default is off).
The root cause is that navigating away to an external site also triggers onbeforeunload
which is used to detect page refresh.
There are better/official ways to detect a browser refresh. The problem is that, in Chrom(ium), SvelteKit returns 'reload' from window.performance.getEntriesByType('navigation')[0].type
during normal app navigation (it returns the correct 'navigate' in FF). This causes the feed to always reset when clicking into and back from a post. Ugh.
Detecting a refresh is desired so that the feed will refresh automatically with the app/page. It's expected on mobile, for example, for a pull-down refresh to refresh the app/feed.
So, for cross-browser compatibility, sometimes the simplest answer is the correct answer:
All external links now open in a new tab, and the user setting for that has been removed. I'm basically embracing the "app" model since Tesseract is designed to be installed as a PWA.