From d0b6abd74805398ac3cbf41aeebf141a805ec64b Mon Sep 17 00:00:00 2001 From: Ashkan <22937754+Ashkanph@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:13:59 +0330 Subject: [PATCH] fix(element): Query the swiper.hostEl for the navigation buttons (#7714) (#7716) --- src/modules/navigation/navigation.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/navigation/navigation.mjs b/src/modules/navigation/navigation.mjs index 4458722b0..ae4275611 100644 --- a/src/modules/navigation/navigation.mjs +++ b/src/modules/navigation/navigation.mjs @@ -23,7 +23,7 @@ export default function Navigation({ swiper, extendParams, on, emit }) { function getEl(el) { let res; if (el && typeof el === 'string' && swiper.isElement) { - res = swiper.el.querySelector(el); + res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el); if (res) return res; } if (el) {