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

[feat] Is there a way to allow window.open() on the front end? #10151

Open
gusxodnjs opened this issue Jun 29, 2024 · 1 comment
Open

[feat] Is there a way to allow window.open() on the front end? #10151

gusxodnjs opened this issue Jun 29, 2024 · 1 comment

Comments

@gusxodnjs
Copy link

gusxodnjs commented Jun 29, 2024

Describe the problem

The front end of my app is an external domain and contains a lot of code that opens a new window with window.open, but it doesn't work on the Tauri app.

I've seen this issue.
However, it's a difficult situation to fix this window.open to webviewWindow. 😭

Is there any way to fix it on the Tauri app? thanks.

Describe the solution you'd like

Disable file download handler for Tauri (ex: disable_drag_drop_handler)

Alternatives considered

No response

Additional context

[✔] Environment
    - OS: Mac OS 13.5.2 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.17.0
    - yarn: 1.22.21
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-alpha.18
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.10

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
@oukrims
Copy link

oukrims commented Jun 30, 2024

I'm too having problem with permissions not working on runtime windows/webviews. I created a tauri command as a workaround
`#[command]
pub fn open_shell(app: tauri::AppHandle, url: String) {
let aid: String = generate_random_string(5);

// app.shell().open(url, Some(Program::Chrome)).unwrap();

}`

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

No branches or pull requests

2 participants