You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ A function that will be called **before** sending focus to the target element up
105
105
() =>void
106
106
```
107
107
108
-
A function that will be called **after** sending focus to the target element upon activation.
108
+
A function that will be called **after** sending focus to the target element upon activation**unless** initial focus is delayed because the [delayInitialFocus](#delayinitialfocus) is true (default).
109
109
110
110
##### onPause
111
111
@@ -139,6 +139,8 @@ A function that will be called immediately after the trap's state is updated to
139
139
140
140
A function that will be called after the trap has been completely unpaused and is once again managing/trapping focus.
141
141
142
+
Note that if [delayInitialFocus](#delayinitialfocus) is true, this handler will be called **before** focus is re-set on the initial focused node.
143
+
142
144
##### checkCanFocusTrap
143
145
144
146
```typescript
@@ -267,6 +269,8 @@ boolean
267
269
268
270
Default: `true`. Delays the autofocus to the next execution frame when the focus trap is activated. This prevents elements within the focusable element from capturing the event that triggered the focus trap activation.
269
271
272
+
🔺 Note that when this option is `true` (default), it means the initial element to be focused will not be focused until **after**[onPostActivate](#onpostactivate) or [onPostUnpause](#onpostunpause) are called.
0 commit comments