SiLeBAT / fcl-client

Web app for analyzing food delivery networks
https://silebat.github.io/fcl-client/
GNU General Public License v3.0
7 stars 2 forks source link

Fix model upload in safari browser #761

Open ruegenbfr opened 10 months ago

ruegenbfr commented 10 months ago

The model upload in safari browser (version 15.4 [17613.1.17.1.13]) is not working properly.

This problem is not present in:

Reproduce:

j-hha commented 2 weeks ago

Debugging notes:

=> Probable explanation: If we trigger a click programmatically within an async function, it becomes an untrusted event. For security reasons, browsers should block (popup) windows from opening. I therefore assume, that this is also true for triggering the opening of a finder window. Safari seems to stick to these security rules, whereas the other Browsers seem to ignore them.

See for example

=> Suggested solution: Refactor code, so we don't violate browser security policies.

Possible solutions:

What we could do:

j-hha commented 1 week ago

@bfrgottscma @afalenski could we talk about this real quick today? I'd have to change the behaviour of the upload buttons a bit to fix this bug and I'd like to confer with you on that.

j-hha commented 1 week ago

Oct 17, 2024: Decision PO: trigger the async data-altered-check and subsequent the proceed-dialog on click on 'upload data' button rather than on proxy file upload button and only open the menu containing the proxy file upload buttons after this has been sorted