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

dialog.New(Folder, File, etc)Open(callback, parent) + Show() does not work in javascript / wasm #5211

Open
2 tasks done
brucealthompson opened this issue Oct 18, 2024 · 3 comments
Labels
unverified A bug that has been reported but not verified

Comments

@brucealthompson
Copy link

brucealthompson commented Oct 18, 2024

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

I have created a new fyne repository interface that implements a subset of webdav functionality. This repository should work with js / wasm since it does not rely on local filesystem calls.

This repository is working with dialog.NewFolderOpen(callback, parent) + Show() when built for Windows. Using a verrsion of fyne with the fix for #5200 included. This dialog.NewFolderOpen(callback, parent) + Show() does NOT work with this repository when built for js / wasm.

Instead of Show() displaying a File/Foler open dialog box, nothing happens.

I assume this issue is due to the other ties that fyne.io\fyne\[email protected]\dialog\file.go has with the fyne "file" repository. See the following issues for examples of the above:
#5207
#5204

How to reproduce

  1. Create a non "file" fyne repository that does not rely on local filesystem calls.
  2. Use the example code below to create a Folder Open dialog using that repository.
  3. Build the application for js / wasm with "fyne package -os web"

Screenshots

No response

Example code

locationURI, err := storage.ParseURI("httpfile:///")
if err != nil {
return err
}
listableURI, err := storage.ListerForURI(locationURI)
if err != nil {
return err
}
folderdialog := dialog.NewFolderOpen(callback, parent)
folderdialog.SetLocation(listableURI)
folderdialog.Show()

Fyne version

2.5.2

Go compiler version

1.23.1

Operating system and version

Windows 11

Additional Information

No response

@brucealthompson brucealthompson added the unverified A bug that has been reported but not verified label Oct 18, 2024
@dweymouth
Copy link
Contributor

I think this is a duplicate of #2737

@andydotxyz
Copy link
Member

I think they are related but not identical.
This is requesting a file open dialog with a source that is not the local filesystem.
Any UI that uses a native dialog might actually need to bring up our own picker instead of native when we know the URI is not local filesystem.
So this is pretty much the other half of that for web - we can support this without solving the local FS read through javascript.

I looked into it and could not figure why the dialog would not be appearing, might require a little debugging to get to the bottom of it and understand the challenge.

@brucealthompson
Copy link
Author

brucealthompson commented Oct 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

3 participants