mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 06:45:24 +00:00
fix: chat item generate title button
This commit is contained in:
parent
d89c5b6c30
commit
17cc3b7d72
2 changed files with 5 additions and 8 deletions
|
|
@ -41,7 +41,7 @@
|
||||||
...(theme !== '' ? { theme } : { theme: 'dark' }),
|
...(theme !== '' ? { theme } : { theme: 'dark' }),
|
||||||
arrow: false,
|
arrow: false,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
interactive: interactive,
|
...(interactive ? { interactive: true } : {}),
|
||||||
...tippyOptions
|
...tippyOptions
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -332,9 +332,13 @@
|
||||||
disabled={generating}
|
disabled={generating}
|
||||||
on:keydown={chatTitleInputKeydownHandler}
|
on:keydown={chatTitleInputKeydownHandler}
|
||||||
on:blur={async (e) => {
|
on:blur={async (e) => {
|
||||||
|
// check if target is generate button
|
||||||
if (ignoreBlur) {
|
if (ignoreBlur) {
|
||||||
ignoreBlur = false;
|
ignoreBlur = false;
|
||||||
|
|
||||||
|
if (e.relatedTarget?.id === 'generate-title-button') {
|
||||||
|
generateTitleHandler();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -440,13 +444,6 @@
|
||||||
on:mouseenter={() => {
|
on:mouseenter={() => {
|
||||||
ignoreBlur = true;
|
ignoreBlur = true;
|
||||||
}}
|
}}
|
||||||
on:click={(e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
e.stopPropagation();
|
|
||||||
|
|
||||||
generateTitleHandler();
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Sparkles strokeWidth="2" />
|
<Sparkles strokeWidth="2" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue