We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ee622f commit d40038dCopy full SHA for d40038d
1 file changed
src/aria/menu/menu.ts
@@ -170,11 +170,13 @@ export class Menu<V> {
170
// submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to
171
// update the display property. The result is focus() being called on an element that is not
172
// focusable. This simply retries focusing the element after render.
173
- afterRenderEffect(() => {
174
- if (this._pattern.visible()) {
175
- const activeItem = untracked(() => this._pattern.inputs.activeItem());
176
- this._pattern.listBehavior.goto(activeItem!);
177
- }
+ afterRenderEffect({
+ write: () => {
+ if (this.visible()) {
+ const activeItem = untracked(() => this._pattern.inputs.activeItem());
+ this._pattern.listBehavior.goto(activeItem!);
178
+ }
179
+ },
180
});
181
182
afterRenderEffect(() => {
0 commit comments