Skip to content

dragEnd event not sent when single-clicking gutter #283

Closed

Description

@pweissenbacher

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.

To Reproduce
Look at the small Stackblitz example (dragging not updating, but events fired as described)
StackBlitz Dev Mode
StackBlitz App Mode

Activity

  1. nomeaning777 commented on Dec 8, 2020

    @nomeaning777
    Contributor

    In the current implementation, the component fires dragStart when a mouse button is pressed.
    However, it fires dragEnd only 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 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.

  2. beeman commented on Dec 8, 2020

    @beeman
    Contributor

    @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.

  3. beeman commented on Dec 18, 2020

    @beeman
    Contributor
  4. locked and limited conversation to collaborators on Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions