MCPcopy Create free account
hub / github.com/adobe/react-spectrum / dispatchVirtualBlur

Function dispatchVirtualBlur

packages/react-aria/src/focus/virtualFocus.ts:17–20  ·  view source on GitHub ↗
(from: Element, to: Element | null)

Source from the content-addressed store, hash-verified

15}
16
17export function dispatchVirtualBlur(from: Element, to: Element | null): void {
18 from.dispatchEvent(createFocusEvent('blur', {relatedTarget: to}));
19 from.dispatchEvent(createFocusEvent('focusout', {bubbles: true, relatedTarget: to}));
20}
21
22export function dispatchVirtualFocus(to: Element, from: Element | null): void {
23 to.dispatchEvent(createFocusEvent('focus', {relatedTarget: from}));

Callers 3

onBlurFunction · 0.90
onFocusFunction · 0.90
moveVirtualFocusFunction · 0.85

Calls 1

createFocusEventFunction · 0.85

Tested by

no test coverage detected