Home > widget-integration > InstantSearchSelectors > closeThemeSearchOverlays

InstantSearchSelectors.closeThemeSearchOverlays() method

Click all visible theme close buttons to dismiss overlays.

When ISW opens in **full-width** style, certain themes show their own search overlay/modal that conflicts with ISW. This method clicks all known close buttons to dismiss those overlays.

**Legacy**: Inline logic inside onOpenSuggestion() for full-width style **New**: Dedicated method on selectors service

Signature:

closeThemeSearchOverlays(customSelector?: string): void;

Parameters

Parameter

Type

Description

customSelector

string

(Optional) Optional custom close-button selector from admin settings

Returns:

void