mirror of
https://github.com/handsomezhuzhu/2fa-tool.git
synced 2026-02-20 19:50:15 +00:00
fix: modify event handling for close button
Remove `e.preventDefault()` to allow close action while keeping `e.stopPropagation()` for event bubbling control. Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com>
This commit is contained in:
@@ -90,9 +90,7 @@ const ToastClose = React.forwardRef<
|
|||||||
)}
|
)}
|
||||||
toast-close=""
|
toast-close=""
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault()
|
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
e.nativeEvent.stopImmediatePropagation()
|
|
||||||
onClick?.(e)
|
onClick?.(e)
|
||||||
}}
|
}}
|
||||||
onPointerDown={(e) => {
|
onPointerDown={(e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user