Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local file losing a file handler #4717

Open
2 tasks done
FarSeeing opened this issue Oct 23, 2024 · 1 comment
Open
2 tasks done

Local file losing a file handler #4717

FarSeeing opened this issue Oct 23, 2024 · 1 comment

Comments

@FarSeeing
Copy link

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug
When creating a new local (device-saved) diagram it gets opened in a new tab but then when you save that diagram - it gets downloaded on each save

To Reproduce
Steps to reproduce the behavior:

  1. Go to a secure site (like https://app.diagrams.net/) using modern browser (to utilize window.showOpenFilePicker)
  2. Chose to store diagrams on a device
  3. Create a diagram selecting some file
  4. Modify & save it, verify it's saved silently,
  5. Create another diagram using the File → New... menu item
  6. Select another file
  7. The second diagram gets opened in a new tab
  8. Modify that new diagram and save it, verify it gets downloaded

Expected behavior
I don't think it's possible to pass a file handler between windows (even same-origin ones) so I would think on changing LocalFile save behavior: if we don't have any file handler (exactly when we have a new tab opened) and the native window.showOpenFilePicker method is supported - call it.

Screenshots
If applicable, add screenshots to help explain your problem.

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 24.8.1

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Browser Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • yes

Additional context
Add any other context about the problem here.

@FarSeeing
Copy link
Author

BTW, FileSystemFileHandle could be passed between tabs but works only for the same-origin tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant