autocomplete input not empty


Topic: autocomplete input not empty

KontYentE asked 6 years ago

Hi there... In the Material form (mbd pro component), there is an issue if the input gets a value attributed after being loaded. Let's say you populate the input with jQuery or the chrome populates with possible email and password (which happens quite a lot) (the so known "yellow background input"). If for some reason, there is a value in the input without being added over the keyboard or preselection of the input (mostly with mouse click), the label will remain inside the input frame (wont go up) which will overlap the value inside the input. One good walk around for this is to $(input).focus() after you had added a value to that input. Another walk around is to had "autofocus" (HTML5) to the input, however in my case this only worked on the first input (i have multiple inputs), (no idea why). Still, "focusing" the input is not gonna call the mdb-autocomplete-clear cross at the end of the input. The Cross will only show if there is a keyup event. Just join the event "focus" to the "keyup", and it will work like a sharm replace
n.on("keyup"
with
n.on("keyup focus",

Jakub Strebeyko staff answered 6 years ago

Hi there, That is some valuable insight right there - thanks tenfold! It has been pushed to the jQ dev department and shall be taken under consideration while building upcoming version. In the meantime, I am pretty sure people in these part will find it particularly useful. Rock on! Cheers, Kuba
Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Mac Book
  • Browser: Chrome
  • OS: iOS
  • Provided sample code: No
  • Provided link: No