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

splitbar can't stop moving by mousemove #223

Open
@DuanHejin

Description

@DuanHejin

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();
 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions