fix(composer): keep first focus on the expert menu when opening options
48d7526 widened the options dialog first-focus selector to inputs, so the new story graph switch above the menus took initial focus. Keyboard users no longer landed on the expert / work mode menus like the model picker. Restore the button-only target; the switch stays reachable with Tab.
This commit is contained in:
@@ -333,7 +333,9 @@ export const Composer = memo(function Composer({
|
||||
}
|
||||
};
|
||||
const frame = requestAnimationFrame(() => {
|
||||
composerOptionsRef.current?.querySelector<HTMLElement>("input:not(:disabled), button:not(:disabled)")?.focus();
|
||||
// Keyboard users land on the same first control as the model picker
|
||||
// (expert / work mode menus); optional switches above stay Tab-reachable.
|
||||
composerOptionsRef.current?.querySelector<HTMLButtonElement>("button:not(:disabled)")?.focus();
|
||||
});
|
||||
document.addEventListener("pointerdown", dismissOutside);
|
||||
document.addEventListener("focusin", dismissOutside);
|
||||
|
||||
Reference in New Issue
Block a user