fix arrows
This commit is contained in:
parent
825ebcc106
commit
061278ec0a
5
main.js
5
main.js
@ -617,11 +617,12 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
bindArrowForGallery('.swiper-button-prev', '.swiper-button-next')
|
bindArrowsForGallery('.swiper-button-prev', '.swiper-button-next')
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindArrowForGallery(leftButtonQuery, rightButtonQuery) {
|
function bindArrowsForGallery(leftButtonQuery, rightButtonQuery) {
|
||||||
document.addEventListener("keydown", function(e) {
|
document.addEventListener("keydown", function(e) {
|
||||||
|
if (!document.querySelector("dialog").open) return
|
||||||
switch(e.key) {
|
switch(e.key) {
|
||||||
case "ArrowLeft":
|
case "ArrowLeft":
|
||||||
$(leftButtonQuery).click()
|
$(leftButtonQuery).click()
|
||||||
|
Loading…
Reference in New Issue
Block a user