onBlur method
- @HostListener.new('blur')
void
onBlur(
- FocusEvent event
)
Implementation
@HostListener('blur')
void onBlur(FocusEvent event) {
// Don't hide the tooltip if the user clicked an empty area on the page.
if (event.relatedTarget == null) return;
// Don't hide the tooltip if focus went to an element inside the tooltip.
for (Element? el = event.relatedTarget as Element?;
el != null && el.parent != null;
el = el.parent) {
if (el.className == overlayContainerClassName) return;
}
hideTooltip(immediate: true);
}