Skip to content

Floating Panel expand to full container width/height during resize #1027

@aseef17

Description

@aseef17

Describe the bug
When resizing floating panels using the edge handles (left/right/top/bottom) after the panel has been extended beyond the viewport, the panel incorrectly snaps to full container width or height

To Reproduce
Codesandbox: https://codesandbox.io/p/devbox/elated-phoebe-7dcqn3?workspaceId=ws_RMkrk1AtN6v75fbTXXenoN
Sandbox Demo: https://7dcqn3.csb.app/

Steps to reproduce the behavior:

  1. Create a floating panel in dockview with 'floatingGroupBounds="boundedWithinViewport"
  2. Drag the right resize handle beyond the viewport/container edge
  3. Now drag the left resize handle to resize from the left side
  4. BUG: Panel immediately expands to full container width

The same issue occurs with

  • Right handle -> then left handle = full width
  • Bottom handle -> then top handle = full height
  • Top handle -> then right handle = full height
  • Left handle -> then right handle = full width

Expected behavior
The panel should resize normally and stay within reasonable bounds, not snap to full container dimensions

Demo

Dockview.-.Floating.Panel.resize.Issue.mov

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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