host: no opener link handler in webviews (target=_blank clicks in site tabs were cancelled and never opened)
This commit is contained in:
parent
1f0e24f9c7
commit
898a14e510
1 changed files with 4 additions and 1 deletions
|
|
@ -1424,7 +1424,10 @@ impl App {
|
|||
let builder = if config.deep_link { builder.plugin(tauri_plugin_deep_link::init()) } else { builder };
|
||||
let builder = builder
|
||||
.plugin(tauri_plugin_window_state::Builder::default().with_state_flags(window_state_flags()).build())
|
||||
.plugin(tauri_plugin_opener::init());
|
||||
// No injected link handler: in a site tab it cancels every target=_blank click and asks for
|
||||
// `plugin:opener|open_url`, which tabs may not call, so nothing opened. Native code routes
|
||||
// new-window requests itself (`on_new_window`); the shell opens links through its commands.
|
||||
.plugin(tauri_plugin_opener::Builder::new().open_js_links_on_click(false).build());
|
||||
// No capability grants the updater/process JS APIs; only Rust drives them.
|
||||
let builder = if config.updater { builder.plugin(tauri_plugin_updater::Builder::new().build()) } else { builder };
|
||||
builder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue