Giter Club home page Giter Club logo

Comments (3)

schlagmichdoch avatar schlagmichdoch commented on May 22, 2024

Hi @mundodisco8
Thanks for including screenshots in your issue!

This issue is only present when installing PairDrop as PWA with the File Handler API enabled.

With this experimental API enabled, on installation, the PWA registers itself as an application to open certain files with. The app is then included in the "open with" dialog and Windows allows you to open certain files with this app. Propably PairDrop is registered as the default app for a certain file type if no other app on the machine is associated with this file type.
As we want to send any file with PairDrop via the context menu I tried to add as many file types as possible.
This is all desired behaviour and enhances the app a lot IMO.

If you take a look at the New App Alert ("Select an app to open this [...] file with") you can see that the default app has not changed upon installation (still Notepad for .txt) but Windows simply alerts you that there is a new app installed that can handle this file as well.
Although you only have to select the default app and press "Always" once for every file type you open, I see the inconvenience.

As far as I know, this behaviour cannot be changed via the apps manifest as it is standard Windows behaviour. It is however possible to prevent windows from opening the new app alert completely via the registry:
https://www.elevenforum.com/t/enable-or-disable-open-with-when-new-app-installed-in-windows-11.5292/#Two
(The naming in the article is a little misleading: You need to do step 3 'Disable Open with when New App Installed')

Independently from PairDrop, I like this behaviour better for any installation.

What do you think? Does that solve your issue?

from pairdrop.

mundodisco8 avatar mundodisco8 commented on May 22, 2024

I tried the registry edition trick on Windows Sandbox and it didn't work, but I don't know if that was caused by the sandbox itself, somehow. If I try it outside of the sandbox I will report. In any case, I'm not comfortable disabling that functionality completely.

I see that this behaviour is by design then, and while I humbly disagree, I totally see your point and the value of your proposition.

In any case, after toying around a bit, I think I cracked it. If I install the app with Chrome, I can disable the access to the File Handling API for just the Pairdrop app (Hamburger menu, App Info, Settings)

image

I haven't managed to find the equivalent toggle for the case of the app being installed from Edge, but who doesn't have 3 or 4 web browsers installed on their computer, right? 😄

This does exactly what I personally need. Given that the issue is not a bug, I will close it.

from pairdrop.

schlagmichdoch avatar schlagmichdoch commented on May 22, 2024

Did you check, that the result of the registry edition was "NoNewAppAlert"=dword:00000001?

Perfect that you found a solution! I didn't know that the File Handling API is activated by default on Chromium. Nice!

That the setting is not offered on Edge is weird. I even tried to open the URL via the app id edge://app-settings/APP_ID but I'm just redirected to the normal settings page without a setting to deactivate the File Handling API. Edge is weird 🤦‍♂️

There is another possiblity though: The manifest of the web app is specified in the header. When I changed <link rel="manifest" href="manifest.json"> to <link rel="manifest" href="manifest_no_file_handlers.json"> which omits the file_handlers setting and updated the service worker afterwords, an already installed app was removed from the 'open with' dialog.

So it would be possible to create a setting which toggles the manifest replacement and serviceworker update.
I won't implement this for now but if more people find the current behaviour annoying this could be a possibility. Until then I will simply recommend your solution but with ungoogled-chromium instead: https://github.com/ungoogled-software/ungoogled-chromium (Downloads)

from pairdrop.

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.