-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
mCustomscrollbar is not working in JQuery 3.6.0 #663
Comments
this is iso to #651 i fix it like that : function bugFix(scrollbar) {
const draggerRail = $(scrollbar).find(".mCSB_draggerRail");
const draggerContainer = $(scrollbar).find(".mCSB_draggerContainer");
if (draggerRail.length > 0 && draggerRail.parent().hasClass("mCSB_dragger")) {
draggerContainer.append(draggerRail);
}
}
$(#my-element).mCustomScrollbar({
axis: "y",
theme: "dark",
callbacks: {
onInit: () => bugFix(this)
}
}); |
I have sent pr to solve this problem fundamentally : #666 |
You can use jquery-migrate plugin with jQuery.UNSAFE_restoreLegacyHtmlPrefilter() or restore the functionality by extending your instance of jQuery manually; The root cause is described here in Security Fix chapter |
go to jquery.mCustomScrollbar.js file and find the method _pluginMarkup, there is array scrollbar that hold the html, notice that few div's are closed like <div ..... /> so you need to replace the closing tags properly like <div .....> |
Yes, in _pluginMarkup replace all " />" for ">" |
Thank you so much @thomasPierreATECNA |
I have updated my JQuery to latest version (3.6.0). After updating the jquery, mCustomScrollbar is not working. I also update the mCustomScrollbar to version (3.1.5). Still it is not working. The mCustomscrollbar is works fine with JQuery 3.3.1.
Can anybody helps to resolve this issue?
The text was updated successfully, but these errors were encountered: