🐛 fix: prevent editor from stealing focus in agent settings modal (#12512)

This commit is contained in:
YuTengjing
2026-02-27 23:20:49 +08:00
committed by GitHub
parent 9b8dabc072
commit 6c3e75634f
@@ -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>