When calling "remove", the private method "removeScrollbarComponents" unwraps the element, instead of its initial content.
A solution could be :
removeScrollbarComponents: function () {
this.removeScrollbar("vertical");
this.removeScrollbar("horizontal");
if (this.overviewAdded)
this.$overview.contents().unwrap(); // Here...
if (this.viewPortAdded)
this.$viewPort.contents().unwrap(); // ...and here
},
When calling "remove", the private method "removeScrollbarComponents" unwraps the element, instead of its initial content.
A solution could be :