Commit 3c318c6
[button] Ensure that Enter/Space triggers click events.
Previously we have applied specific duck tape in a bunch
of places to prevent "keydown" event handlers on parent
elements from eating up Enter/Space events and thus not
firing click events on buttons as expected. With this CL
we put the logic solely into the `<devtools-button>`
component (together with a test) to ensure not every use
site has to deal with this, and it's less easy to miss.
Fixed: 373168872, 372411090
Change-Id: I00c183547a7f7f2e20a95467687885db463280ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5982917
Auto-Submit: Benedikt Meurer <[email protected]>
Commit-Queue: Kim-Anh Tran <[email protected]>
Reviewed-by: Kim-Anh Tran <[email protected]>1 parent 0cd9217 commit 3c318c6
File tree
5 files changed
+43
-36
lines changed- front_end
- panels/issues/components
- ui
- components/buttons
- legacy
5 files changed
+43
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
| |||
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
74 | | - | |
75 | | - | |
| 66 | + | |
76 | 67 | | |
77 | 68 | | |
78 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
169 | 183 | | |
170 | 184 | | |
171 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
303 | 325 | | |
304 | 326 | | |
305 | 327 | | |
| |||
362 | 384 | | |
363 | 385 | | |
364 | 386 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
369 | 392 | | |
370 | 393 | | |
371 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
1218 | 1217 | | |
1219 | 1218 | | |
1220 | 1219 | | |
| |||
1265 | 1264 | | |
1266 | 1265 | | |
1267 | 1266 | | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | 1267 | | |
1282 | 1268 | | |
1283 | 1269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | 1103 | | |
1111 | 1104 | | |
1112 | 1105 | | |
| |||
0 commit comments