bootstrap-slider icon indicating copy to clipboard operation
bootstrap-slider copied to clipboard

Cannot read property 'removeChild' of null

Open viceice opened this issue 6 years ago • 3 comments

If i destroy a slider, who's parent node has been removed from the dom, it will crash here:

https://github.com/seiyria/bootstrap-slider/blob/4bac28fdfad8232c8f34bdd13ebda355864b78a0/src/js/bootstrap-slider.js#L1002

viceice avatar Jan 25 '19 11:01 viceice

I'm calling destroy from ko.utils.domNodeDisposal.addDisposeCallback callback.

viceice avatar Jan 25 '19 12:01 viceice

You'll need to provide a demo. But also I'm not sure this happens with any of the other libraries we list so if this is exclusive to knockout then it might just be a knockout problem.

seiyria avatar Jan 25 '19 14:01 seiyria

Ok, i will try to build a fiddle. My current workaround is to use JQuery.empty to cleanup.

viceice avatar Jan 25 '19 14:01 viceice