Skip to content

Commit d42954b

Browse files
authored
chore: fix typos (#1260)
1 parent 465fc7e commit d42954b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/document/patchFocus.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -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

src/keyboard/parseKeyDef.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {keyboardKey} from '../system/keyboard'
22
import {readNextDescriptor} from '../utils'
33

44
/**
5-
* Parse key defintions per `keyboardMap`
5+
* Parse key definitions per `keyboardMap`
66
*
77
* Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.
88
* Everything else will be interpreted as a typed character - e.g. `a`.

src/utils/focus/cursor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function getNextCursorPosition(
2323
// Firefox always moves to zero offset and jumps over last offset.
2424
// Chrome jumps over zero offset per default but over last offset when Shift is pressed.
2525
// The cursor always moves to zero offset if the focus area (contenteditable or body) ends there.
26-
// When walking foward both ignore zero offset.
26+
// When walking forward both ignore zero offset.
2727
// When walking over input elements the cursor moves before or after that element.
2828
// When walking over line breaks the cursor moves inside any following text node.
2929

0 commit comments

Comments
 (0)