core icon indicating copy to clipboard operation
core copied to clipboard

Nested d2l-dialog can cause outer dialog to close when closed.

Open dbatiste opened this issue 4 years ago • 0 comments

Ref: Activities#1476.

The DialogMixin already provides some support for stopping the propagation of the d2l-dialog-close event so that outer dialogs aren't automatically closed, however internally it supports both native dialog element and our own custom dialog implementation, and this logic was overlooked for the native declarative usage.

This is probably partly due to the fact that nested dialogs are not "advertised" as supported because a) we don't really want to use nested dialogs from a design perspective; and b) when the dialogs components were originally built there were some issues encountered with nested dialogs in either IE11, legacy Edge, or both. In short, hardening nested dialog scenario was deferred until we saw legit need for them.

There is a demo page for it, however it uses the open method supports this use case properly, and so it requires modification to reproduce this bug.

Alternate to the existing slo'n to call stopPropagation on the event, we can consider changing the event the bubbles: false, however that may or may not cause some breakage for the component, and its consumers.

dbatiste avatar Feb 08 '21 20:02 dbatiste