material design lite - How to focus an MDL TextField -


what proper way focus material design lite textfield?

this works:

$("#mytextfield").focus(); 

this not work:

document.getelementbyid('mytextfield').parentnode.materialtextfield.focus(); 

however, similar code works disable textfield:

document.getelementbyid('mytextfield').parentnode.materialtextfield.disable(); 

you don't need jquery.

  input.focus();   input.parentnode.classlist.add('is-dirty'); 

Comments

Popular posts from this blog

javascript - Why Selenium can't find an element that is graphically visible -

android - Basic camera in app -

scala - Using the kronecker product on complex matrices with scalaNLP breeze -