Skip to content

initSwiper bug fix - #434

Open
hayden-t wants to merge 1 commit into
givanz:masterfrom
hayden-t:patch-12
Open

hayden-t wants to merge 1 commit into
givanz:masterfrom
hayden-t:patch-12

Conversation

@hayden-t

@hayden-t hayden-t commented Dec 4, 2025

Copy link
Copy Markdown

execution via the eventlistener sends the event object which breaks initSwiper's 'onlyNew' parameter, stopping existing swiper from initialising.

also there was a problem with single = in param check i corrected

execution via the eventlistener sends the event object which breaks initSwiper's 'onlyNew' parameter, stopping existing swiper from initialising.

also there was a problem with single = in param check i corrected
@hayden-t

hayden-t commented Dec 4, 2025

Copy link
Copy Markdown
Author

i just went on a multi hour deep dive into errors thrown in slide nav via left panel even in live demo, and its due to false true of if (param[0] = '{') { fixed in this PR. problem is it corrupts the swiper dataset , so any swiper will need recreating to remove the json that has now been inserted into eg the navigation tag and thus overwrites the internal navigation object casing errors: Uncaught TypeError: can't access property "split", a.disabledClass is undefined

@hayden-t

hayden-t commented Dec 4, 2025

Copy link
Copy Markdown
Author

im wondering what code puts a json in a data attr ? and also does this code here also need json handling ability ?

setTimeout(function () {
for (i in dataset) {
element.swiper.params[i] = dataset[i];
element.dataset[i] = dataset[i];
};
element.swiper.update();
}, 1000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant