0

I have an autosuggest component (with a TextField from material-ui), my issue is that after selecting a value from the autosuggest (eg. with the mouse), the suggestion remains open since the input still has the focus

How do I navigate to the next focusable element programmatically?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Zied Hamdi
  • 2,400
  • 1
  • 25
  • 40
  • Do you mean AutoComplete? Can you provide online example like AutoComplete Example: https://codesandbox.io/s/jer2r – Oleg Oct 22 '19 at 11:14
  • no the component is an autosuggest (a react lib), but that's not relevant for the question. I think the answer is rather in the html like this: https://stackoverflow.com/questions/40304963/how-to-focus-next-input-field-on-keypress/40305042 – Zied Hamdi Oct 22 '19 at 11:16
  • can you provide mini example? – Oleg Oct 22 '19 at 11:19
  • The mini example is just a tag where I want to loose focus on a given event This answer contains an answer in pure js, i'll try that https://stackoverflow.com/questions/7208161/focus-next-element-in-tab-index currentElement.nextElementSibling.focus(); – Zied Hamdi Oct 22 '19 at 11:21

0 Answers0