lion/packages
Denilson Sá Maia ef7f16a51c fix(overlays): don't call _setupOverlayCtrl() in OverlayMixin if the component is not connected
In our application, there is a very complicated logic that creates a bunch of form fields based on some data. It's very complicated, we hate that logic; but it exists, it works, and it is being used in production.

Somewhere in that logic, under a very specific case, a datepicker form field is created, connected, and then immediately disconnected. Don't ask me why, I said it is complicated.

This commit fixes a bug in OverlayMixin. The `connectedCallback` calls `_setupOverlayCtrl()` asynchronously, after a `Promise.then()`. Thus, by the time this setup function is called, the component has already been disconnected (and `disconnectedCallback()` has already been called).

The fix is simple: don't try to setup the overlay if the component is no longer connected.
2025-07-26 15:05:49 +02:00
..
ajax Version Packages 2024-11-06 12:04:34 +01:00
singleton-manager feat(ui): [core] allow browserDetection to be run in ssr context 2024-04-10 12:12:40 +02:00
ui fix(overlays): don't call _setupOverlayCtrl() in OverlayMixin if the component is not connected 2025-07-26 15:05:49 +02:00