@@ -29,6 +29,7 @@ const TextField = (props) => (
29
29
``` js
30
30
// Types
31
31
type FocusEvent = {
32
+ target: Element ,
32
33
type: ' blur' | ' focus' | ' focuschange'
33
34
}
34
35
```
@@ -80,6 +81,7 @@ const Link = (props) => (
80
81
// Types
81
82
type HoverEvent = {
82
83
pointerType: ' mouse' ,
84
+ target: Element ,
83
85
type: ' hoverstart' | ' hoverend' | ' hovermove' | ' hoverchange'
84
86
}
85
87
```
@@ -123,10 +125,6 @@ be called more than once before `onHoverEnd` is called.
123
125
124
126
Whether to ` preventDefault() ` native events.
125
127
126
- ### stopPropagation: boolean = true
127
-
128
- Whether to ` stopPropagation() ` native events.
129
-
130
128
131
129
## Press
132
130
@@ -165,6 +163,7 @@ const Button = (props) => (
165
163
// Types
166
164
type PressEvent = {
167
165
pointerType: ' mouse' | ' touch' | ' pen' | ' keyboard' ,
166
+ target: Element ,
168
167
type: ' press' | ' pressstart' | ' pressend' | ' presschange' | ' pressmove' | ' longpress' | ' longpresschange'
169
168
}
170
169
@@ -250,8 +249,9 @@ Ensure you pass in a constant to reduce memory allocations.
250
249
251
250
### preventDefault: boolean = true
252
251
253
- Whether to ` preventDefault() ` native events.
254
-
255
- ### stopPropagation: boolean = true
256
-
257
- Whether to ` stopPropagation() ` native events.
252
+ Whether to ` preventDefault() ` native events. Native behavior is prevented by
253
+ default. If an anchor is the child of ` Press ` , internal and external navigation
254
+ should be performed in ` onPress ` /` onLongPress ` . To rely on native behavior
255
+ instead, set ` preventDefault ` to ` false ` , but be aware that native behavior will
256
+ take place immediately after interaction without respect for delays or long
257
+ press.
0 commit comments