ticlo / rc-dock

Dock Layout for React Component

Home Page:https://ticlo.github.io/rc-dock/examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panel is duplicated after panel drag/drop on itself

vasko5petrov opened this issue · comments

Expected Behavior: Dropping a panel on itself should not modify the panel.

Actual Behavior: There seems to be a horizontal and vertical lines within the panel which are really small (1px). When intersected a drop indicator shows up and you can drop the panel on itself. This causes the panel to duplicate with the same ids and content.

Steps to reproduce: https://codesandbox.io/p/sandbox/rc-dock-tabs-issue-g5xjx2

  1. Start dragging panel with tab "a2" in it (drag the whole panel not the tab)
    image
  2. Go up, right before reaching the tabs line a drop indicator on the bottom of the panel will appear.
    image
  3. Going up or down 1px and the drop indicator disappears.
  4. Drop the panel on this exact 1px line when the drop indicator is visible.
  5. The whole panel will be duplicated with tab "a2" inside.
    image

This was tested on version "3.0.19" and "3.2.18" of rc-dock.