malihu-custom-scrollbar-plugin
malihu-custom-scrollbar-plugin copied to clipboard
mCSB_container[0] can be undefined sometimes
Version 3.1.3
In a few days with new version of mCustomScrollbar I've got 2 errors:
- Cannot read property 'autoUpdate' of undefined
- Cannot read property 'onCompleteTimeout' of undefined
It looks like mCSB_container[0] can be undefined sometimes. Can you protect against this?
Version 3.1.3
Hi, I am also having the same issue. It happens when the scrollbars are attached to dynamically created dropdown list and you navigate away from the list. the new view will throw this exception: jquery.mCustomScrollbar.js:1915 Uncaught TypeError: Cannot read property 'autoUpdate' of undefined.
I hope that would help to fix the issue.
Peter.
Hi !
Version 3.1.3 The same with chosen select and Malihu... Any solutions with the issue ?
Jérôme
@Djey1301
Hi,
Can you edit version 3.1.3 jquery.mCustomScrollbar.js and test the code below?
Edit jquery.mCustomScrollbar.js and add the following in a new line after line 1909:
if(!mCSB_container.length) return;
Let me know
I had the same issue, and It resolved by your comment.
3.1.5 has the same issue
My solution is: try{ !!$(domId).data("mCS") && $(".search-tooltip").mCustomScrollbar("destroy"); //Destroy }catch (e){ $(domId).data("mCS",''); //Manual Destroy //console.log(e); }
@kylvia works for me, thank you~