Skip to content

Monkeypatch WorkspaceSvg.isDragging to return true if a keyboard "drag" is in progress #359

@rachel-fenichel

Description

@rachel-fenichel

Current implementation:

  /**
   * Is the user currently dragging a block or scrolling the flyout/workspace?
   *
   * @returns True if currently dragging or scrolling.
   */
  isDragging(): boolean {
    return this.currentGesture_ !== null && this.currentGesture_.isDragging();
  }

This is causing issues with testing the constrained and unconstrained dragging because an interaction with the disableOrphans listener makes the moving block appear disabled.

Proposed solution

In DragMover.startMove, monkeypatch isDragging to return true.
In DragMover.finishMove and DragMover.abortMove, undo the monkeypatch and restore the normal function.

Additional information

Longer term, we'll need the workspace to know whether a keyboard drag is in progress, because the keyboard drags won't be registered as gestures.

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