MCPcopy Create free account
hub / github.com/UI5/webcomponents / _focusout

Method _focusout

packages/main/src/ComboBox.ts:646–668  ·  view source on GitHub ↗
(e: FocusEvent)

Source from the content-addressed store, hash-verified

644 }
645
646 _focusout(e: FocusEvent) {
647 const toBeFocused = e.relatedTarget as HTMLElement;
648 const clearIconWrapper = this.shadowRoot!.querySelector(".ui5-input-clear-icon-wrapper");
649 const focusedOutToClearIcon = clearIconWrapper === toBeFocused || clearIconWrapper?.contains(toBeFocused);
650
651 if (this._effectiveShowClearIcon && focusedOutToClearIcon) {
652 return;
653 }
654
655 this._fireChangeEvent();
656
657 const focusedOutToItemsPicker = this.open && this._getPicker().contains(toBeFocused);
658 const focusedOutToValueState = this.valueStateOpen && this.contains(toBeFocused);
659
660 if (focusedOutToItemsPicker || focusedOutToValueState || this._handleLinkNavigation) {
661 e.stopImmediatePropagation();
662 return;
663 }
664
665 if (!(this.getDomRef()!.contains(toBeFocused)) && (this._getPicker() !== e.relatedTarget)) {
666 this.focused = false;
667 }
668 }
669
670 _beforeOpenPopover() {
671 if (isPhone()) {

Callers

nothing calls this directly

Calls 3

_fireChangeEventMethod · 0.95
_getPickerMethod · 0.95
containsMethod · 0.80

Tested by

no test coverage detected