fix: prevent image context menu and drag
This commit is contained in:
parent
1274942f64
commit
402bc91566
2 changed files with 4 additions and 2 deletions
|
|
@ -33,7 +33,8 @@ export default function Emoji({
|
|||
<img
|
||||
src={emoji.url}
|
||||
alt={emoji.shortcode}
|
||||
className={cn('inline-block size-5 rounded-sm', classNames?.img)}
|
||||
draggable={false}
|
||||
className={cn('inline-block size-5 rounded-sm pointer-events-none', classNames?.img)}
|
||||
onLoad={() => {
|
||||
setHasError(false)
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -90,11 +90,12 @@ export default function Image({
|
|||
alt={alt}
|
||||
decoding="async"
|
||||
loading="lazy"
|
||||
draggable={false}
|
||||
{...props}
|
||||
onLoad={handleLoad}
|
||||
onError={handleError}
|
||||
className={cn(
|
||||
'object-cover rounded-lg w-full h-full transition-opacity',
|
||||
'object-cover rounded-lg w-full h-full transition-opacity pointer-events-none',
|
||||
isLoading ? 'opacity-0' : 'opacity-100',
|
||||
className
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue