Commit 415dd5a
authored
## Summary:
- Converted `DropdownOpener` in a function component.
- Fixed `DropdownOpener` to propagate the onBlur event correctly. This change
allows to update the focused styles when the opener is blurred.
Issue: https://khanacademy.atlassian.net/browse/WB-2152
## Test plan:
1. Navigate to the ActionMenu with custom opener story: `/?path=/story/packages-dropdown-actionmenu--custom-opener`
2. Press `tab` until the focus is set on the opener.
3. Press `Enter` or `Space` to open the menu.
4. Press `Escape` to close it.
5. Verify that the focus returns to the opener.
6. Press `tab` again and ensure that the focus styles are removed from the opener.
BONUS: Verify that the `SingleSelect` and `MultiSelect` with custom opener
stories continue working as expected.
- `/?path=/story/packages-dropdown-singleselect--custom-opener`
- `/?path=/story/packages-dropdown-multiselect--custom-opener`
Author: jandrade
Reviewers: jandrade, marcysutton, nedredmond
Required Reviewers:
Approved By: marcysutton
Checks: ✅ 12 checks were successful, ⏭️ 3 checks have been skipped
Pull Request URL: #2864
1 parent d0f325d commit 415dd5a
File tree
2 files changed
+57
-51
lines changed- .changeset
- packages/wonder-blocks-dropdown/src/components
2 files changed
+57
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 52 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | | - | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 81 | + | |
| 82 | + | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | | - | |
| 88 | + | |
| 89 | + | |
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
100 | | - | |
| 93 | + | |
101 | 94 | | |
102 | 95 | | |
103 | 96 | | |
| 97 | + | |
104 | 98 | | |
105 | | - | |
| 99 | + | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
| |||
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
128 | 145 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
0 commit comments