wannabegeek / ng2-split-pane

Split View module for Angular 2
MIT License
43 stars 25 forks source link

Unable to select and drag and drop inside primary and secondary containers #22

Closed ampeixoto closed 7 years ago

ampeixoto commented 7 years ago

I really like this plugin but I think there is a problem with it.

Version "ng2-split-pane": "^1.3.1"

It is not possible to select text inside the primary and secondary container. Also, I have a plugin inside that has drag and drop functionality that doesn't work when inside one of these containers. It seems some event are not passed to child elements.

I found this issue #3 that might be related.

But I checked the source code and did the following change in the library (file - vertical-split-pane.component.js):

Before

VerticalSplitPaneComponent.prototype.onMousemove = function (event) {
        if (this.isResizing) {
            var coords = position_service_1.PositionService.offset(this.primaryComponent);
            this.applySizeChange(event.pageX - coords.left);
        }
        return false;
    };

After

VerticalSplitPaneComponent.prototype.onMousemove = function (event) {
        if (this.isResizing) {
            var coords = position_service_1.PositionService.offset(this.primaryComponent);
            this.applySizeChange(event.pageX - coords.left);
        }
        //return false;
    };

Commented the return false; statement.

Everything started to work without apparent side effects.

Could you check if this is a possible fix and if it is, create a new version?

Update

There is already a pull request with this fix: Fix for selecting text in splitted panes #21

ampeixoto commented 7 years ago

Any update on this?

wannabegeek commented 7 years ago

I have just release version 1.4.0 which should resolve this Thanks