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

Method _onfocusout

packages/main/src/Input.ts:1150–1177  ·  view source on GitHub ↗
(e: FocusEvent)

Source from the content-addressed store, hash-verified

1148 innerFocusIn(): void | undefined { }
1149
1150 _onfocusout(e: FocusEvent) {
1151 const toBeFocused = e.relatedTarget as HTMLElement;
1152
1153 if (this.Suggestions?._getPicker()?.contains(toBeFocused) || this.contains(toBeFocused) || this.getSlottedNodes("valueStateMessage").some(el => el.contains(toBeFocused))) {
1154 return;
1155 }
1156
1157 this.focused = false; // invalidating property
1158 this._isChangeTriggeredBySuggestion = false;
1159 if (this.showClearIcon && !this._effectiveShowClearIcon) {
1160 this._clearIconClicked = false;
1161 this._handleChange();
1162 }
1163
1164 this.open = false;
1165 this._clearPopoverFocusAndSelection();
1166
1167 if (!this._clearIconClicked) {
1168 this.previousValue = "";
1169 }
1170
1171 this.lastConfirmedValue = "";
1172 this.isTyping = false;
1173
1174 if ((this.value !== this.previousValue) && this.showClearIcon) {
1175 this._clearIconClicked = false;
1176 }
1177 }
1178
1179 _clearPopoverFocusAndSelection() {
1180 if (!this.showSuggestions || !this.Suggestions) {

Callers

nothing calls this directly

Calls 4

_handleChangeMethod · 0.95
containsMethod · 0.80
_getPickerMethod · 0.45

Tested by

no test coverage detected