Topic: Clicking in input on placeholder text prevents input/focus

ionyx pro asked 6 years ago


Hello If you have a label for an input field, it appears over the field until you click on it. Problem is, if you click on the actual label part (the text), you are unable to get a form input focus on the actual input field, so you cannot type in the value.  If you click next to the label, in the empty space, it all works ok. How do you make the actual text from the label clickable and allow input to the field? e.g. <div class="md-form"> <label for="input1">Enter your form value here</label> <input id="input1" placeholder="" name="input1" type="text" class="form-control"> </div> So if you click on the text "Enter your form value here", nothing happens. I have to click next to the end of the words in empty space to get field focus and enter a value (where the label then slides up out of the way correctly). Thank you.  

ionyx pro commented 6 years ago

Resolved

ionyx pro commented 6 years ago

Resolved

ionyx pro answered 6 years ago


Issue was the label "for" value did not match the input "id" value.  This prevents clicking on the text from working. all sorted!  :)  

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags