Git Product home page Git Product logo

Comments (4)

filips123 avatar filips123 commented on June 8, 2024 1

I think that specifically "Do not change link behaviour" causes the most problems.

For example, I think that one of the problems is that when this option is enabled, some links will be opened in new tabs and some in new windows. And when you click on a link that opens something in a new tab, the old tab will remain loaded. The problem is that because tabs are hidden in PWAs, you wouldn't know the old tab is still loaded. So, if you then opened a few more such links, you would build a set of hidden tabs that could be just taking resources without a way to access them (well, you could switch tabs with Ctrl+Tab but that isn't something that users would normally do in PWA).

So, if we were to change the default, I think that "Force links into a new window" is a better option. If that option is enabled, it also handles a few more ways to open links that are normally not handled to make it more consistent and reliable. However, I still need to check if it causes any problems and if I need to fix anything. And, well, to check what exactly that function does, in case anything has changed in Firefox internally since I originally wrote it, or I forgot anything. Maybe I'll also split the preference into multiple ones, but I'm not sure yet.

though as it is I'll have to tell users of my PWA to change the default

I think that for now, this is probably what you should do... Because I don't have much time currently and there are also a few other things that I would like to do before doing this.

Should I close this issue and (if you think it's a good idea) open a new one to explore changing the default?

I'll just rename this one.

from pwasforfirefox.

Jaifroid avatar Jaifroid commented on June 8, 2024

On further testing, I see it is possible to open a new window with right-click. This works well because the original PWA is not overwritten. However, doing so in code, as mentioned above, doesn't appear to work. It's good that it is technically possible to open a new window, i.e. that standalone mode does allow it, albeit manually.

from pwasforfirefox.

filips123 avatar filips123 commented on June 8, 2024

This can be changed by the user in the app browser settings with the "When opening a link that should normally open in a new window or tab" option. If it's set to "Force links into the current tab" (which is the default), then all links will be opened in the current tab. If it's set to "Force links into a new window", then they will be opened in a new window.

And to be honest, I'm not completely sure why I've chosen the current tab as a default. I think there are/were some problems with built-in Firefox links (from menus and such) if opening in new windows is selected.

from pwasforfirefox.

Jaifroid avatar Jaifroid commented on June 8, 2024

Ah, OK, thanks for the info and the super-quick response.

IMHO, I think the default setting should be "Do not change link behaviour" unless it's really producing problems for the app. On a quick test, I didn't notice any issues. As this is the default behaviour of all browsers, it would seem more intuitive for any "force" setting to be a deliberate user choice rather than a default.

Setting it to "Do not change link behaviour" does what I want, though as it is I'll have to tell users of my PWA to change the default, for the reasons mentioned above. Should I close this issue and (if you think it's a good idea) open a new one to explore changing the default?

from pwasforfirefox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.