react-photoswipe icon indicating copy to clipboard operation
react-photoswipe copied to clipboard

Render PhotoSwipe in a Portal

Open onigoetz opened this issue 8 years ago • 2 comments

Is it possible that the PhotoSwipeGallery renders PhotoSwipe in a portal ?

(something like this : https://github.com/tajo/react-portal)

I have the case where my gallery is rendered in an absolute container and it messes up with PhotoSwipe.

onigoetz avatar Nov 17 '16 19:11 onigoetz

@onigoetz Did you end up with a solution for this?

oyeanuj avatar Mar 14 '17 03:03 oyeanuj

Hello, yes, I used a portal on my side, it works perfectly fine.

https://github.com/onigoetz/Comics-Reader/blob/master/src/js/components/ExtendedPhotoSwipeGallery.js

This is how I made it work.

onigoetz avatar Apr 27 '17 19:04 onigoetz