mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-13 19:20:04 +00:00
🐛 fix: prevent editor from stealing focus in agent settings modal (#12512)
This commit is contained in:
@@ -46,8 +46,12 @@ const ProfileArea = memo(() => {
|
||||
height={'100%'}
|
||||
style={styles.contentWrapper}
|
||||
width={'100%'}
|
||||
onClick={() => {
|
||||
editor?.focus();
|
||||
onClick={(e) => {
|
||||
// Only focus editor for clicks within this DOM element,
|
||||
// not from React portal (e.g. Modal) whose DOM is outside this tree
|
||||
if (e.currentTarget.contains(e.target as Node)) {
|
||||
editor?.focus();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<WideScreenContainer>
|
||||
|
||||
Reference in New Issue
Block a user