Clicking label does not activate text input
See original GitHub issueI am using ruby on rails with Materialize Gem I am working on signup/sign-in form in Model The problem is with password text field .when clicked on password label active class is not added but work fine with other input fields can’t see any issue in java-script . Inputs do not activate when clicking the label. You need to click below the label to active.
Rendered Html Output
`<form class="new_user" id="new_user" action="/signup" accept-charset="UTF-8" method="post">
<div class="row"> <div class="col s12 center-align"> wc <label for="user_gender_male">Male</label> <label for="user_gender_female">Female</label> </div> </div> <div class="row"> <div class="input-field col s12 m6"> account_circle <label for="user_user_name">Name</label> </div> <div class="input-field col s12 m6"> date_range <label for="user_dob">Birthday</label> </div> </div> <div class="row"> <div class="input-field col s12 m6"> lock_outline <label for="user_password">Password</label> </div> <div class="input-field col s12 m6"> lock_outline <label for="user_password_confirmation">Password confirmation</label> </div> </div> <div class="row"> <div class="input-field col s12 m6"> assignment_ind <label for="user_email">Email</label> </div> <div class="input-field col s12 m6"> phone <label for="user_phone_number">Phone number</label> </div> </div> <div class="row"> <div class="col s12"> </div> </div> </form>`Any Help Will be Welcomed.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Clicking label doesn't check my input field - Stack Overflow
1 Answer. Save this answer. Show activity on this post. You'll have to assign the label to the correct input, so either use...
Read more >28657 - Clicking on <LABEL> doesn't put focus in INPUT field
Try clicking on a label associated with a form field in IE. It passes focus to the field. Even if this wasn't standard...
Read more >Clicking on label input file does'nt work - WordPress.org
Hello, I want to style an input file created with forminator in css. To achieve this, the main solution is to hide the...
Read more >How to activate or focus an input HTML element when clicking ...
As you can see from the above GIF that when clicking on the label HTML element the input HTML element is not getting...
Read more >Input Label not clickable - remains in the field - MDBootstrap
The Label (inactive) keeps me from clicking into the input box if I click on the ... username, password and password2 do not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have wrong
id
in the<label for="
attribute.Check the:
https://codepen.io/kmmbvnr/pen/dObyzM?editors=1000#0
Labels works fine.
I’ve had the same problem but was able to monkeypatch that quite easily with the help of css pointer-events.
Just adding the following piece of less code did the trick for me. If you’re not using less, the actual code will of course differ for you but the basic principle stays the same.
Having said that, I think this should definitely be fixed directly to Materialize.