Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

splitbar can't stop moving by mousemove #223

Open
DuanHejin opened this issue Jan 5, 2017 · 0 comments
Open

splitbar can't stop moving by mousemove #223

DuanHejin opened this issue Jan 5, 2017 · 0 comments

Comments

@DuanHejin
Copy link

DuanHejin commented Jan 5, 2017

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();
 });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant