I currently have pikabu configured and working great in a project locally. When the screen is resized smaller, I set up and enable pikabu, and when it becomes larger I undo all of that and display my UI normally for desktop view. This is working fine, except for that it doesn't return my UI back to normal desktop view after I pull a drawer out. I get this error in my console:
Uncaught TypeError: Cannot read property 'scrollHeight' of undefined
So, doing some digging, I found that it's looking for this:
https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L516-L517
And that the sidebar is set here:
https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L417
I found that when I accessed my pikabu object, that pikabu.activeSidebar contained null. Fantastic! "I can solve this!" I thought. So I manually called pikabu.openSidebar('left') which worked, but I still got the Cannot read properly 'scrollHeight' of undefined error. I checked pikabu.activeSidebar to see what it held, and it was holding left as expected. Hmn.
So then I took a look at pikabu.$sidebars and found that it was indeed holding an object with left and right. I tried running pikabu.$sidebars['left'] then, and got []. I then tried pikabu.$sidebars.left and still got [].

Any idea how to solve this? Is there something else I should be doing? This is how I am initing pikabu:
self.pikabu = new Pikabu({
viewportSelector: '.body-chatter',
widths: {
left: '90%',
right: '90%'
},
selectors: {
element: '#candy'
}
});
I have also set my m-pikabu-sidebar m-pikabu-left (and right) classes, as well as m-pikabu-nav-toggle and data-role='left' stuff on the toggle buttons.
Any input/help/advice would be greatly appreciated. Thanks!
I currently have pikabu configured and working great in a project locally. When the screen is resized smaller, I set up and enable pikabu, and when it becomes larger I undo all of that and display my UI normally for desktop view. This is working fine, except for that it doesn't return my UI back to normal desktop view after I pull a drawer out. I get this error in my console:
Uncaught TypeError: Cannot read property 'scrollHeight' of undefinedSo, doing some digging, I found that it's looking for this:
https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L516-L517
And that the sidebar is set here:
https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L417
I found that when I accessed my pikabu object, that
pikabu.activeSidebarcontainednull. Fantastic! "I can solve this!" I thought. So I manually calledpikabu.openSidebar('left')which worked, but I still got theCannot read properly 'scrollHeight' of undefinederror. I checkedpikabu.activeSidebarto see what it held, and it was holdingleftas expected. Hmn.So then I took a look at
pikabu.$sidebarsand found that it was indeed holding an object with left and right. I tried runningpikabu.$sidebars['left']then, and got[]. I then triedpikabu.$sidebars.leftand still got[].Any idea how to solve this? Is there something else I should be doing? This is how I am initing pikabu:
I have also set my
m-pikabu-sidebar m-pikabu-left(andright) classes, as well asm-pikabu-nav-toggleanddata-role='left'stuff on the toggle buttons.Any input/help/advice would be greatly appreciated. Thanks!