react-beautiful-dnd icon indicating copy to clipboard operation
react-beautiful-dnd copied to clipboard

No animation on drag div with display:contents

Open nukuutos opened this issue 4 years ago • 9 comments

Expected behavior

Dragging animation on drag div with display: contents.

Actual behavior

No animation on dragging div with display: contents.

Suggested solution?

I think, styles don't correctly apply todiv with display: contents.

What version of React are you using?

16.13.1

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

13.0.0

What browser are you using?

Google Chrome Version 86.0.4240.198

Demo

Everything's fine when display property of .service is not contents

<Draggable draggableId={title} index={order}>
        {({ innerRef, draggableProps, dragHandleProps }, snapshot) => {
          return (
            <div
              ref={innerRef}
              {...draggableProps}
              {...dragHandleProps}
              className="service">
              <span className="service__title mt-s-3">{title}</span>
              <span className="service__duration">{duration}</span>
              <span className="service__price">{price}</span>
            </div>
          );
        }}
</Draggable>

nukuutos avatar Nov 26 '20 14:11 nukuutos

I have the same problem.

stonecrafter avatar Dec 09 '20 14:12 stonecrafter

I stumbled upon this one too. Is this expected behaviour?

yxeri avatar Dec 25 '20 08:12 yxeri

After some gathering I understood that it's not working correctly with grid, only flexbox. If I'm wrong, correct me.

nukuutos avatar Dec 25 '20 13:12 nukuutos

It works with display: grid, but it acts up with contents.

yxeri avatar Dec 30 '20 13:12 yxeri

@nukuutos curious why you closed this issue? Can we keep it open? As far as I can tell, using display: contents is still broken/unsupported.

stephenh avatar Mar 07 '21 14:03 stephenh

If it works with display: grid (@yxeri ) and not with display: contents so we must to reopen it

nukuutos avatar Mar 20 '21 03:03 nukuutos

any idea on how to circumvent this? I'm also stuck in a similar scenario.

I have a display: grid wrapper and a group of columns (but there is no "row" definition) since using css grid doesn't require it

fernandofleury avatar Mar 29 '21 13:03 fernandofleury

Any updates on this?

larissa-n avatar Nov 15 '21 12:11 larissa-n

Still happening? any workaround to this?

SpectorHacked avatar Sep 17 '23 13:09 SpectorHacked