fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

React DND Drag and Drop Touch Events not working inside Dialog and Modal components

Open ghost opened this issue 6 years ago • 15 comments

Environment Information

  • Package version(s): (7.97.1)
  • Browser and OS versions: (Touch supported devices)

https://codesandbox.io/s/reactdndmultibackendcolordrop-127yh

Use case about the mentioned repository

image

If we drag the red/green/blue color box and drop it to the gray box we get an alert about which color has dropped. Open Pop up link opens the Dialog component having same drag and drop logic. Open Model link open the Modal component having same drag and drop logic.

Actual behavior:

I was using React dnd-multi-backend to make it work for both touch and mouse events. But unfortunately Drag and Drop Touch events are not working inside Dialog or Modal window even after setting the eventBubblingEnabled to true. However It works in normal screen. Mouse events work in all scenarios. Earlier I have reported this issue #11264, but this has been fixed for the old Edge browser alone and the ticket has been closed. As it became high priority requirement for us to make it work in all browsers I am opening a new ticket. Could you please provide the fix for Chrome and Edge Chromium browsers.

Expected behavior:

When we try to do the color drag and drop from normal screen or inside the Dialog or inside Modal window it should work for both Mouse events and Touch events

Priorities and help requested:

Requested priority: (High)

ghost avatar Feb 26 '20 15:02 ghost

@jyothsnag29 Thanks for reaching out to us! I'm able to repro this on Chrome but not on Edge. I see that you're passing in eventBubblingEnabled as part of the layer props in both Modal and Dialog in your codesandbox. Besides this, the other solution I'm aware of is what component owner @JasonGore suggested in this comment: https://github.com/OfficeDev/office-ui-fabric-react/issues/11264#issuecomment-569065254 but we already implemented this and merged that PR (which is what fixed it for Edge). I'm not sure what else we can do here... As Jason mentioned, there is an open issue on facebook's react repo addressing this controversial event bubbling problems: https://github.com/facebook/react/issues/11387. I'm not aware of anything else we can do inside the Fabric components - correct me if I'm wrong @JasonGore

aneeshack4 avatar Feb 26 '20 23:02 aneeshack4

@aneeshack4 Per your comment I thought that #11571 resolved this issue for multiple browsers, including Chrome. If it's not working in Chrome now and it did before, we should isolate the differences to find root cause. Did it work immediately after #11571? Has it regressed since? etc.

There shouldn't be anything about #11571 that should be browser-specific, so I think it'd be good to matrix behaviors before and after the change and be certain about what is and isn't working to triage this issue properly. Thanks!

JasonGore avatar Feb 27 '20 08:02 JasonGore

As far as I can tell, #11571 fixed this problem for Edge but not for Chrome (and I can see it repros on Safari on mobile too after testing @sortegamartin's codesandbox... will keep investigating image ^doesn't repro on Edge on Surface book using the touch screen

aneeshack4 avatar Feb 28 '20 01:02 aneeshack4

@aneeshack4 any progress on this?

ghost avatar May 15 '20 11:05 ghost

Up. Any progress? Happy for work on this one.

Kingwl avatar Jul 09 '20 10:07 Kingwl

any progress on this?

villasante avatar Sep 30 '20 16:09 villasante

I would also highly appreciate a fix for this. I just build this minimal codebox and then I found this open issue.

Wezea avatar Mar 08 '21 17:03 Wezea

Also have the similar issue, where drag and drop works when in Web Mode, however stops working in Mobile view. Really looking forward to get this issue fixed. Please suggest.

vandanamuc avatar Mar 26 '21 17:03 vandanamuc

We have the same issue with mobile and drag and drop.

corriespondent avatar Apr 29 '21 22:04 corriespondent

Also having this issue.

parmira5 avatar Jul 25 '21 07:07 parmira5

Because this reported issue has not had any activity for over 180 days, we're automatically closing it for house-keeping reasons.

Still require assistance? Please, create a new issue with up-to date details and latest version of Fluent.

msft-fluent-ui-bot avatar Feb 04 '22 17:02 msft-fluent-ui-bot

I believe this is still a problem, last time we checked - any update?

corriespondent avatar Feb 04 '22 17:02 corriespondent

@corriespondent no updates but let me reopen this for you if this is still a problem

khmakoto avatar Feb 04 '22 23:02 khmakoto

I stumbled upon this issue and since there is no fix, I cannot use the Modal component.

ishantsolanki-vakt avatar Feb 08 '22 15:02 ishantsolanki-vakt

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar Jul 08 '22 16:07 msft-fluent-ui-bot