discourse/app/assets/javascripts/dialog-holder/addon
David Taylor ed2dae6d1a
FIX: Ensure dialogs are still rendered if triggered during boot (#22511)
When the loading slider is enabled, the rendering of `application.hbs` is slightly delayed compared to the old 'spinner' strategy. This means that if a route tried to render a dialog during its `model()` hook, the dialog wrapper element would not be present and an error would occur.

This commit detects that situation and delays rendering the error until the next runloop iteration. If the element is still not found, we print a useful error to the console.

In the long term, we should ideally convert the dialog service to use a pure-ember rendering strategy instead of leaning on a11y-dialog. But for now, this workaround should resolve the problems identified by the chat system specs.
2023-07-10 11:29:04 +01:00
..
components DEV: Support using Ember components in dialog service (#20230) 2023-02-13 13:03:31 -05:00
services FIX: Ensure dialogs are still rendered if triggered during boot (#22511) 2023-07-10 11:29:04 +01:00