fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[fluentui][Modal] plotly.js scrollbar inside Modal doesn't work with mouse.

Open chnldw opened this issue 5 years ago • 7 comments

Environment Information

  • Package version(s): 8, latest.
  • Browser and OS versions: Win10 21H1, Chrome Version 94.0.4606.61 (Official Build) (64-bit)

Please provide a reproduction of the bug in a codepen:

It seems drag event handler is broken within Modal or Panel. Similar issue for monaco editor: https://github.com/microsoft/fluentui/issues/19299

Here's a repro: https://codepen.io/chnldw/pen/jOwXjzG

Actual behavior:

Use mouse to drag the scrollbar in plotly.js chart inside of Modal doesn't work, but keyboard works well.

Expected behavior:

Use mouse to drag the scrollbar in plotly.js chart inside of Modal should work

Priorities and help requested:

Are you willing to submit a PR to fix? No

Requested priority: High

Products/sites affected: https://ml.azure.com/

chnldw avatar Sep 28 '21 18:09 chnldw

I confirm that I can reproduce this issue w/ a Panel.

AlexandreGarino avatar Oct 07 '21 16:10 AlexandreGarino

Thanks for filing this issue with us. To set expectations the developers will review this issue once capacity allows. @bsunderhus - Would you be able to confirm if this is a regression, or if this behavior is an issue?

gouttierre avatar Oct 25 '21 13:10 gouttierre

Gentle ping on this, this issue is keeping one of our customer tickets open. Thanks!

cartacioS avatar Nov 02 '21 21:11 cartacioS

@gouttierre this is a regression as we've seen this functionality working before in our product (Azure IoT Central, we use the Panel).

I filed this bug (and then closed it) on the monaco-editor team and some context was provided in that the mousemove events are not reaching the document.

any idea on when this could get fixed?

dehoward avatar Dec 01 '21 23:12 dehoward

Can confirm multiple libraries are having click + drag issues inside of Panels / Modals as well.

https://codesandbox.io/s/admiring-waterfall-xx0kl?file=/src/App.js

NoodleBug avatar Dec 08 '21 15:12 NoodleBug

This is happening because Layer prevents events that propagate from within its content from bubbling to outside. Both Modal and Panel render Layer internally. To disable this behavior set eventBubblingEnabled to true (docs link).

@chnldw I've updated your sample to work here: https://codepen.io/seanms/pen/XWzWzLx @Noodle-Bug I've updated your sample to work here: https://codesandbox.io/s/panel-eventbubblingenabled-q124g?file=/src/App.js

This issue appears to be related to changes to event delegation in React 17. In the case of rc-slider in the Codesandbox example the issue is that it attaches native DOM events to document to implement the click-n-drag slide behavior but because of the React 17 event delegation changes Layer's behavior now prevents these events from bubbling up to document. I didn't look at the implementations of the other affected components but I imagine they are similar.

spmonahan avatar Jan 26 '22 00:01 spmonahan

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!

msft-fluent-ui-bot avatar Jan 30 '22 02:01 msft-fluent-ui-bot