diff --git a/packages/react-photo-view/src/Photo.less b/packages/react-photo-view/src/Photo.less index 01d9050..dcabb27 100644 --- a/packages/react-photo-view/src/Photo.less +++ b/packages/react-photo-view/src/Photo.less @@ -1,7 +1,7 @@ .PhotoView__Photo { max-width: initial; - -webkit-user-drag: none; cursor: grab; + user-select: none; &:active { cursor: grabbing; diff --git a/packages/react-photo-view/src/Photo.tsx b/packages/react-photo-view/src/Photo.tsx index edc66a8..8d26018 100644 --- a/packages/react-photo-view/src/Photo.tsx +++ b/packages/react-photo-view/src/Photo.tsx @@ -59,11 +59,16 @@ export default function Photo({ src={src} onLoad={handleImageLoaded} onError={handleImageBroken} + draggable={false} alt="" {...restProps} /> {!loaded && - ({loadingElement} || )} + (loadingElement ? ( + {loadingElement} + ) : ( + + ))} ); }