host: no opener link handler in webviews (target=_blank clicks in site tabs were cancelled and never opened)

This commit is contained in:
CRTkafa 2026-10-02 06:11:38 +07:00
parent 4945a84d8b
commit 58e7fff6c6

View file

@ -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