disable photoswipe keyboard event when info modal is open
This commit is contained in:
parent
4f01979b14
commit
c46ba48980
|
@ -285,6 +285,12 @@ function PhotoSwipe(props: Iprops) {
|
|||
updateItems(items);
|
||||
}, [items]);
|
||||
|
||||
useEffect(() => {
|
||||
if (photoSwipe) {
|
||||
photoSwipe.options.arrowKeys = !showInfo;
|
||||
}
|
||||
}, [showInfo]);
|
||||
|
||||
function updateFavButton() {
|
||||
setIsFav(isInFav(this?.currItem));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue