mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Fix toggle show control firing unnecessarily
This commit is contained in:
parent
173728536a
commit
25ff0d7835
1 changed files with 5 additions and 1 deletions
|
@ -142,7 +142,11 @@ function MediaModal({
|
|||
key={media.id}
|
||||
ref={i === currentIndex ? carouselFocusItem : null}
|
||||
onClick={(e) => {
|
||||
if (e.target !== e.currentTarget) {
|
||||
// console.log(e);
|
||||
// if (e.target !== e.currentTarget) {
|
||||
// setShowControls(!showControls);
|
||||
// }
|
||||
if (!e.target.classList.contains('media')) {
|
||||
setShowControls(!showControls);
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue