button.remove(); line, can lead to endless loop, as destroy event is triggered again and _destroy method ends up called again and again.
My fix is to remove the button's event listeners first:
button.off(); button.remove();
w.d.mainWrap.popup("destroy"); line, can cause an error to be thrown, if there is an inactive popup.
My fix is to wrap it to a try/catch:
try { w.d.mainWrap.popup("destroy"); } catch (e) { }
Hi and thanks again for this project!
I've encountered two bugs in _destroy method:
button.remove();
line, can lead to endless loop, as destroy event is triggered again and _destroy method ends up called again and again. My fix is to remove the button's event listeners first:button.off(); button.remove();
w.d.mainWrap.popup("destroy");
line, can cause an error to be thrown, if there is an inactive popup. My fix is to wrap it to a try/catch:try { w.d.mainWrap.popup("destroy"); } catch (e) { }