question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v1, how can I focus a select field?

See original GitHub issue

I’m using version 1.0.0-rc.1, I used .focus() to focus the field but it doesn’t work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
alexwbaumanncommented, May 14, 2018

It’s not clear what your tried or your exact goal. Here is a CodePen that will hopefully help you. I put some comments into the JS area to which you’ll want to pay attention.

0reactions
acburstcommented, May 29, 2018

Personally I don’t like overwriting built in functions so I don’t think we will implement this. A couple extra lines shouldn’t be too bad

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML <select>: focus option based on user input?
Here is a complete solution: Add attributes to each option, as @JMC suggests. However, I'd prepend the attribute name with "data-" to be...
Read more >
Programmatically set focus on select · Issue #1212 - GitHub
I'm currently doing it like this. The focus moves to the select element insde the dropdown... $("input") ...
Read more >
HTMLElement.focus() - Web APIs | MDN
Select the button to set focus on the text field. Focus on a button. This example demonstrates how you can set the focus...
Read more >
ILCE-1 | Help Guide | Selecting the focus method (Focus Mode)
Selects the focus method to suit the movement of the subject. Turn the focus mode dial while pressing the focus mode dial lock...
Read more >
<Field /> | Formik
Either a React component or the name of an HTML element to render. That is, one of the following: input; select; textarea; A...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found