react-inner-image-zoom icon indicating copy to clipboard operation
react-inner-image-zoom copied to clipboard

zoomType is "hover" and zoomPreload is "false" style top or left miscalculation

Open WhaleFallXH opened this issue 2 years ago • 2 comments

<InnerImageZoom src="unsplash.jpg" zoomSrc="unsplash-large.jpg" width={600} height={750} // zoomPreload={true} zoomType="hover" fullscreenOnMobile hideHint hasSpacer />

Warning:NaNis an invalid value for thetopcss style property. in img (at ZoomImage.js:7) in ZoomImage (at InnerImageZoom.js:327) in figure (at InnerImageZoom.js:299)

WhaleFallXH avatar Jun 28 '22 06:06 WhaleFallXH

@laurenashpole

WhaleFallXH avatar Jun 28 '22 06:06 WhaleFallXH

@WhaleFallXH I'm unable to reproduce this. Even throttling to simulate a slow network I'm seeing a long pause before the image appears but no warnings. I might need more details on how you're using the component, what version, and what browser you're seeing that warning on to investigate more.

I do recommend using zoomPreload whenever you use to zoomType hover to avoid flickering or any other oddities.

laurenashpole avatar Jul 14 '22 07:07 laurenashpole