React-beautiful-dnd: Draggables disappear inside of other portals.

Created on 20 Mar 2019  ·  11Comments  ·  Source: atlassian/react-beautiful-dnd

Type

Bug

Description

Draggables seem to disappear when using DnD lists that are inside of another portal. I am using Semantic UI's Popup to create the parent portal. I've tried using the portal method to create the DnDs but this also doesn't seem to work. Also there are no errors/warnings in console.

Expected behavior

Draggables can be moved within a parent droppable as normal. Siblings move to accommodate.

Actual behavior

Draggable disappears but siblings move correctly.

Steps to reproduce

  1. Create DnD context within Portal
  2. Drag draggables within droppable
  3. Element most recently dragged disappears

Demo

Ive created a demo here:
https://codesandbox.io/s/ovj6xqr39?fontsize=14

There are 4 DNDs. Only the first one (top left) works correctly. The other 3 have some combination of portals listed below.

  • Top Left: Normal => works correctly
  • Top Right: Within a parent portal without portal draggables
  • Bottom Left: Normal with portal draggables
  • Bottom Right: Within a parent portal with portal draggables

Additional Information

Duplicates

Could be related to #485 & https://github.com/atlassian/react-beautiful-dnd/issues/128

What version of React are you using?

16.6.1

What version of react-beautiful-dnd are you running?

10.1.0

What browser are you using?

Chrome 72.0.3626.121

Edit: Spelling and grammar

investigating 🕵️‍♂️

Most helpful comment

Any update on this?

All 11 comments

giphy-25

I'll try to take a look soon 😄

Any progress on this? I've moved to a simple up/down button system for now but I would really like to use DnD for a cleaner UX.

Okay, i think i can see what is going on. I will post some more findings soon

1267

Hi @alexreardon, do you happen to have any updates on this?
Thank you very much

This is quite strange. I suspect that our new cloning api might get around this problem all together. I can let you know when an alpha of that version is ready

1317

Can you please check to see if 12.0.0-alpha.7 has fixed this issue?

Sorry for taking so long to reply. Unless my example needs to be updated in someway other than an increase in version number, I was not able to see a difference.
https://codesandbox.io/s/vertical-lists-within-portals-with-without-portal-dnds-pet19

Any update on this?

Was this page helpful?
0 / 5 - 0 ratings