Skip to content

Commit cf37b8e

Browse files
Fix delete button click propagation in Independent Panel
Co-authored-by: PeterDaveHello <[email protected]>
1 parent d437a1e commit cf37b8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/DeleteButton/index.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function DeleteButton({ onConfirm, size, text }) {
3535
onBlur={() => {
3636
setWaitConfirm(false)
3737
}}
38-
onClick={() => {
38+
onClick={(e) => {
39+
e.stopPropagation()
3940
setWaitConfirm(false)
4041
onConfirm()
4142
}}
@@ -46,7 +47,8 @@ function DeleteButton({ onConfirm, size, text }) {
4647
title={text}
4748
className="gpt-util-icon"
4849
style={waitConfirm ? { display: 'none' } : {}}
49-
onClick={() => {
50+
onClick={(e) => {
51+
e.stopPropagation()
5052
setWaitConfirm(true)
5153
}}
5254
>

0 commit comments

Comments
 (0)