Skip to content

Commit

Permalink
fix(navigation): don't hide navigation on pagination click
Browse files Browse the repository at this point in the history
fixes #4285
  • Loading branch information
nolimits4web committed Mar 2, 2021
1 parent 68b8a93 commit 7b7cccf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/navigation/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,19 @@ export default {
},
click(swiper, e) {
const { $nextEl, $prevEl } = swiper.navigation;
const targetEl = e.target;
if (
swiper.params.navigation.hideOnClick &&
!$(e.target).is($prevEl) &&
!$(e.target).is($nextEl)
!$(targetEl).is($prevEl) &&
!$(targetEl).is($nextEl)
) {
if (
swiper.pagination &&
swiper.params.pagination &&
swiper.params.pagination.clickable &&
(swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))
)
return;
let isHidden;
if ($nextEl) {
isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);
Expand Down

0 comments on commit 7b7cccf

Please sign in to comment.