Home > widget-integration > InstantSearchSelectors > closeThemeDialogComponent
InstantSearchSelectors.closeThemeDialogComponent() method
Ask the theme's own dialog component to close itself.
Horizon 2025+ releases its scroll lock only inside dialog-component.closeDialog(), and that method is gated on dialog.open — so calling the native dialog.close() first would make the release unreachable forever. Calling the component method keeps the theme's internal lock bookkeeping consistent (it may track lock sources per element, in which case removing the attribute alone is not enough).
Deliberately not awaited: Horizon's closeDialog() awaits an animation that may never run once the dialog leaves the top layer, so the returned promise can stay pending. is the fallback for that case.
Signature:
protected closeThemeDialogComponent(dialog: HTMLElement): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
dialog |
HTMLElement |
The theme dialog element about to be closed |
Returns:
void