fix: Cancel and Continue in the web search confirmation popup need two clicks (#31976)

With the admin setting Web Search Confirmation on, switching on Web Search from the Integrations menu opened the confirmation popup while the menu stayed open behind it. The first click on Cancel or Continue only closed the menu, so the buttons looked broken until clicked a second time. The menu now closes when the popup opens, so one click confirms or cancels.

Fixes #31963
This commit is contained in:
Classic298 2026-10-07 14:22:46 +02:00 • committed by GitHub
parent 6defd4a947
commit 806644fcba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@
import {
chatId,
config,
selectedTerminalId,
settings,
terminalServers,
@ -448,6 +449,10 @@
aria-pressed={webSearchEnabled}
on:click={() => {
webSearchEnabled = !webSearchEnabled;
// Left open, this menu would swallow the first click on the confirmation dialog
if (webSearchEnabled && $config?.features?.enable_web_search_confirmation) {
show = false;
}
onWebSearchToggle(webSearchEnabled);
}}
>