-
Couldn't load subscription status.
- Fork 191
splitbar can't stop moving by mousemoveΒ #223
Description
If a parent HTML is using ui-layout, the splitbar can work normally when mouse click, mouse move, and mouse up.
But, when opening a model window which also is using ui-layout, the parent HTML can't work correctly by mouse click , mouse move and mouse up, just after closing the model window.
After checking the ui-layout.js source code, I find that,
scope.$on('$destroy', function() {
htmlElement.off('mouseup touchend mousemove touchmove');
});
when a scope was destroyed, the ui-layout will clear the mouseup touchend and mousemove touchmove listeners at the same time.
At this time, if the parent HTML still having the ui-layout, the parent HTML's splitbar just can not work corrently.
So, I think it is enough that when the ui-layout element was destoryed, then clear all of the ui-layout's listeners etc. Just like the following code.
element.on('$destroy', function() {
ctrl.removeContainer(scope.splitbar);
scope.$evalAsync();
});