Skip to content

Single-panel Popout drags back into the dock at wrong position, causing IndexOutOfBounds #1004

@zaxer2

Description

@zaxer2

Describe the bug
A bit of a tough one to explain:
When you have a Popout window that's a single panel, and drag that panel back into the dock, it will order itself incorrectly among its neighbors.
This doesn't happen when you drag the whole popped-out group, only the popped-out panel.
This only happens if the position you drag it to is a neighbor following the position from where it was popped-out.
If this happens at the far edge of a set of neighbors, an IndexOutOfBounds occurs, and the panel is lost.

To Reproduce
dockview.dev provides a number of examples with Code Sandbox templates. Are you able to produce the bug by forking one of those templates? Sharing a link to the forked sandbox with the bug would be extremely helpful.

Best demonstrated by video:

Dockview.Bug.Demo.mp4

Desktop (please complete the following information):

  • Chrome
  • Dockview v latest (4.7.1)

Additional context
This issue becomes very apparent and problematic when trying to do regular popout panel operations with singleTabMode=fullwidth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions