-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
navigation-hide-on-click="true"
hides navigation when clicking nextEl/prevEl
#7559
navigation-hide-on-click="true"
hides navigation when clicking nextEl/prevEl
#7559
Comments
t0ggles-create swiper |
Task nolimits4web/SWIPER-137 was created |
Task nolimits4web/SWIPER-137 status changed to Done |
Hello @nolimits4web - Thanks for the quick turn on applying a fix for the navigation buttons, I've verified that the navigation buttons no longer toggle visibility when clicked when Unfortunately, I'm still seeing what I believe are other issues as mentioned in the OP:
Let me know if you feel if these items are expected behavior and if not, happy to open a new issue to cover those. Thank you! |
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-element-navigation-hide-on-click-repro-3x4w6c
Bug description
With
navigation-hide-on-click="true"
, clicking on navigation elements results in the navigation elements toggling hidden/visible.In reviewing the target of the event passed to the listener, it is always the
swiper-container
and not the navigation element (when nav element was clicked) resulting in the internal checks failing to detect that the navigation element itself was clicked.I am unable to reproduce this issue with Swiper Core - see identical configuration repro. When using Core, the "swiper"
click
event never fires when clicking a navigation element, whereas in Element,swiperclick
fires.One other note is that I noticed that each event fires twice (in both Element and Core). For example, when clicking a slide,
click
event fires twice andnavigationHide/Show
fires twice. This does seem odd but possibly expected behavior? As mentioned, this occurs in both Element & Core. The double event does not happen every time but it happens nearly every time.Steps to reproduce:
Expected Behavior
click
event should not fire.Actual Behavior
When clicking the navigation element directly, the navigation toggles visibility and each event fires twice.
Element Repro Console Log (event name / target id / event)
Core Repro Console Log (event name / swiper instance)
Swiper version
11.1.3
Platform/Target and Browser Versions
Windows Edge Version 125.0.2535.51, Windows Chrome Version 125.0.6422.112, Firefox 126.0
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: