Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when setting focus programmatically using "focused=true" the tabindex order is not updated #674

Open
ar4hc opened this issue Mar 27, 2024 · 3 comments

Comments

@ar4hc
Copy link

ar4hc commented Mar 27, 2024

I have a form with multiple selects in a row and then and a few button after them.

One of the buttons, say "do stuff" does stuff(tm) and then should set the focus on the 1. select again.

Something like

	function handleFocus() {
	  focused = true;
	  listOpen = true;
	}

works, kind of, and opens the list for keyboard and mouse navigation, but on tab press in the select the focus is on the button after the "do stuff" button i clicked to focus on the 1. select again.

I'd expect it to jump to the select right after the focuses select, not skipping to the button after the clicked button...

@ar4hc
Copy link
Author

ar4hc commented Mar 27, 2024

Another observation:
setting the focus with "focused=true" shows the Select with the "focus:" CSS styles, even if another button is the "real" focus.

@ar4hc
Copy link
Author

ar4hc commented Mar 27, 2024

repl

@ar4hc
Copy link
Author

ar4hc commented May 2, 2024

bump ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant