fix: prevent default click behavior in Media (#1905)

This commit is contained in:
Whitewater
2024-11-28 16:07:58 +08:00
committed by GitHub
parent d9bf02da85
commit 97dee6eda4
@@ -135,6 +135,7 @@ const MediaImpl: FC<MediaProps> = ({
const isError = currentState === "error"
const previewMedia = usePreviewMedia()
const handleClick = useEventCallback((e: React.MouseEvent) => {
e.preventDefault()
if (popper && src) {
const width = Number.parseInt(props.width as string)
const height = Number.parseInt(props.height as string)