You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there are only some slides with a data-hash, getting to one without it will put a #null in the URL. The effect on user interaction is harmless, but for people who'd pay attention to the URL it looks like a bug, and it's also a likely bug on the slideshow author's side.
(This is indirectly related to #6789 -- sorry about the noise there, I somehow messed things up with running into a problem that was probably solved in 69acab4.)
Suggested solution
It would be better if such slides would just drop the #null from the URL, which IIUC, would make the overall interaction the same.
Alternative
Alternatively, it could assign an ordered integer to these slides, or a hash based on the slide contents. This would have the added benefit of making hashNavigation: true work immediately without adding the data attributes to slides.
(It's easy to just add document.querySelectorAll("div.swiper-slide").forEach((d, n) => d.dataset.hash = n + 1);, but why not make it possible to do so automatically...?)
Clear and concise description of the problem
When there are only some slides with a
data-hash
, getting to one without it will put a#null
in the URL. The effect on user interaction is harmless, but for people who'd pay attention to the URL it looks like a bug, and it's also a likely bug on the slideshow author's side.(This is indirectly related to #6789 -- sorry about the noise there, I somehow messed things up with running into a problem that was probably solved in 69acab4.)
Suggested solution
It would be better if such slides would just drop the
#null
from the URL, which IIUC, would make the overall interaction the same.Alternative
Alternatively, it could assign an ordered integer to these slides, or a hash based on the slide contents. This would have the added benefit of making
hashNavigation: true
work immediately without adding the data attributes to slides.(It's easy to just add
document.querySelectorAll("div.swiper-slide").forEach((d, n) => d.dataset.hash = n + 1);
, but why not make it possible to do so automatically...?)Additional context
No response
Validations
Would you like to open a PR for this feature?
The text was updated successfully, but these errors were encountered: