@@ -39,27 +39,27 @@ export function patchFocus(HTMLElement: typeof globalThis['HTMLElement']) {
39
39
return focus . call ( this , options )
40
40
}
41
41
42
- const blured = getActiveTarget ( this . ownerDocument )
43
- if ( blured === this ) {
42
+ const blurred = getActiveTarget ( this . ownerDocument )
43
+ if ( blurred === this ) {
44
44
return
45
45
}
46
46
47
47
const thisCall = Symbol ( 'focus call' )
48
48
activeCall = thisCall
49
49
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' , {
54
54
relatedTarget : activeCall === thisCall ? this : null ,
55
55
} )
56
56
}
57
57
if ( activeCall === thisCall ) {
58
58
focus . call ( this , options )
59
- dispatchDOMEvent ( this , 'focus' , { relatedTarget : blured } )
59
+ dispatchDOMEvent ( this , 'focus' , { relatedTarget : blurred } )
60
60
}
61
61
if ( activeCall === thisCall ) {
62
- dispatchDOMEvent ( this , 'focusin' , { relatedTarget : blured } )
62
+ dispatchDOMEvent ( this , 'focusin' , { relatedTarget : blurred } )
63
63
}
64
64
}
65
65
@@ -68,17 +68,17 @@ export function patchFocus(HTMLElement: typeof globalThis['HTMLElement']) {
68
68
return blur . call ( this )
69
69
}
70
70
71
- const blured = getActiveTarget ( this . ownerDocument )
72
- if ( blured !== this ) {
71
+ const blurred = getActiveTarget ( this . ownerDocument )
72
+ if ( blurred !== this ) {
73
73
return
74
74
}
75
75
76
76
const thisCall = Symbol ( 'blur call' )
77
77
activeCall = thisCall
78
78
79
79
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 } )
82
82
}
83
83
}
84
84
0 commit comments