@@ -39,27 +39,27 @@ export function patchFocus(HTMLElement: typeof globalThis['HTMLElement']) {
3939 return focus . call ( this , options )
4040 }
4141
42- const blured = getActiveTarget ( this . ownerDocument )
43- if ( blured === this ) {
42+ const blurred = getActiveTarget ( this . ownerDocument )
43+ if ( blurred === this ) {
4444 return
4545 }
4646
4747 const thisCall = Symbol ( 'focus call' )
4848 activeCall = thisCall
4949
50- if ( blured ) {
51- blur . call ( blured )
52- dispatchDOMEvent ( blured , 'blur' , { relatedTarget : this } )
53- dispatchDOMEvent ( blured , 'focusout' , {
50+ if ( blurred ) {
51+ blur . call ( blurred )
52+ dispatchDOMEvent ( blurred , 'blur' , { relatedTarget : this } )
53+ dispatchDOMEvent ( blurred , 'focusout' , {
5454 relatedTarget : activeCall === thisCall ? this : null ,
5555 } )
5656 }
5757 if ( activeCall === thisCall ) {
5858 focus . call ( this , options )
59- dispatchDOMEvent ( this , 'focus' , { relatedTarget : blured } )
59+ dispatchDOMEvent ( this , 'focus' , { relatedTarget : blurred } )
6060 }
6161 if ( activeCall === thisCall ) {
62- dispatchDOMEvent ( this , 'focusin' , { relatedTarget : blured } )
62+ dispatchDOMEvent ( this , 'focusin' , { relatedTarget : blurred } )
6363 }
6464 }
6565
@@ -68,17 +68,17 @@ export function patchFocus(HTMLElement: typeof globalThis['HTMLElement']) {
6868 return blur . call ( this )
6969 }
7070
71- const blured = getActiveTarget ( this . ownerDocument )
72- if ( blured !== this ) {
71+ const blurred = getActiveTarget ( this . ownerDocument )
72+ if ( blurred !== this ) {
7373 return
7474 }
7575
7676 const thisCall = Symbol ( 'blur call' )
7777 activeCall = thisCall
7878
7979 blur . call ( this )
80- dispatchDOMEvent ( blured , 'blur' , { relatedTarget : null } )
81- dispatchDOMEvent ( blured , 'focusout' , { relatedTarget : null } )
80+ dispatchDOMEvent ( blurred , 'blur' , { relatedTarget : null } )
81+ dispatchDOMEvent ( blurred , 'focusout' , { relatedTarget : null } )
8282 }
8383}
8484
0 commit comments