You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dragEnd event not sent when single-clicking gutter #283
Describe the bug
Package version: 4.0.0
When dragging the gutter, the events "dragStart/dragEnd" are working fine.
But when soley clicking the gutter, the dragStart event is fired, but the dragEnd event is not.
I think it is better to fire dragStart event only when a mouse button is pressed and the cursor is moved.
I will be happy to create a PR if this breaking change is acceptable.
@nomeaning777 I'm definitely interested in a PR that adds support for this (or maybe, fixes the bug that dragStart gets emitted when nothing gets dragged).
It would be awesome if it could be implemented with minimal amount of code changes, and add some cypress tests that prove the behavior.
I think we can publish that in a major version, maybe it can go into v5.
Activity
nomeaning777 commentedon Dec 8, 2020
In the current implementation, the component fires
dragStartwhen a mouse button is pressed.However, it fires
dragEndonly when the mouse cursor is moved and the button is released.If mouse cursor is not moved, it emits
gutterClick/gutterDblClick.https://github.com/angular-split/angular-split/blob/main/projects/angular-split/src/lib/component/split.component.ts#L709
I think it is better to fire
dragStartevent only when a mouse button is pressed and the cursor is moved.I will be happy to create a PR if this breaking change is acceptable.
beeman commentedon Dec 8, 2020
@nomeaning777 I'm definitely interested in a PR that adds support for this (or maybe, fixes the bug that
dragStartgets emitted when nothing gets dragged).It would be awesome if it could be implemented with minimal amount of code changes, and add some cypress tests that prove the behavior.
I think we can publish that in a major version, maybe it can go into v5.
fix: fire dragStart event only when a cursor is moved (angular-split#283
fix: fire dragStart event only when a cursor is moved (angular-split#283
fix: fire dragStart event only when a cursor is moved (angular-split#283
fix: fire dragStart event only when a cursor is moved (#283)
beeman commentedon Dec 18, 2020
This fix is released in version 5.0.0 thanks to @nomeaning777 🎉
https://stackblitz.com/edit/angular-ivy-xhc5bj?file=src/app/app.component.html