You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally I would disable the sticky sidebar for smaller screens (< 992px) by using the "minWidth" option, but I would like to try something different with the destroy function. I have created a fiddle to demonstrate the issue.
You will notice that the sticky sidebar is disabled when the document is loaded, and when you resize above 992px it will stick as expected. Once you resize back below 992px, the sticky sidebar should be disabled, but it throws an error. Watch the console.
The text was updated successfully, but these errors were encountered:
I had a problem with my destroy related to Vue 3 as version 3 uses proxies for everything.
Sticky sidebar makes use of the handleEvent function, which is the reason why the whole class is passed to the addEventListener but in Vue's case, when I called the destroy function, it called it on the proxy and not the real this so it couldn't unbind the event.
Normally I would disable the sticky sidebar for smaller screens (< 992px) by using the "minWidth" option, but I would like to try something different with the destroy function. I have created a fiddle to demonstrate the issue.
https://jsfiddle.net/kynham79/
You will notice that the sticky sidebar is disabled when the document is loaded, and when you resize above 992px it will stick as expected. Once you resize back below 992px, the sticky sidebar should be disabled, but it throws an error. Watch the console.
The text was updated successfully, but these errors were encountered: