ticlo / rc-dock

Dock Layout for React Component
https://ticlo.github.io/rc-dock/examples
Apache License 2.0
684 stars 96 forks source link

[Bug] Cannot drop floating window into empty "place-holder" dock-panel in "edge" dropMode #199

Open tjcouch-sil opened 1 year ago

tjcouch-sil commented 1 year ago

I seem to be unable to drop a tab into an empty docking area as of some version post-2.1.7. Because you can't close all tabs in the dropMode="edge" example, I made some CodeSandboxes to reproduce the issue:

First, a sandbox that uses React 16.8.3, react-scripts 2.1.8, and rc-dock 2.1.7: rc-dock-edge-old-zones

  1. Drag the float tab around (not on the group bar for the float tab, but the actual tab part that says "float") and notice you can drop it in various places. Do not drop it anywhere, but let go of it in a place that will let it stay floating.
  2. Close the "stationary" tab.
  3. Drag the float tab (same part, not the group bar) around and notice you can drop it in various places.

Secondly, a sandbox that uses React 18.2.0, react-scripts 5.0.1, and rc-dock 3.2.17: rc-dock-edge-no-zones

Perform the same steps as above, but notice on step 3 that you cannot drop the floating tab anywhere. I believe this may be related to the problem @embeoo had in #143, but I'm not completely sure.

(Thanks to duongnniw for the CodeSandbox I forked from!)

Thank you very much for the hard work on this library! It is a great docking framework.