Good morning everybody!
I have a case, when I should prevent users to entering space as a first character on input field.
I have a demo here: http://jsbin.com/fo
document.querySelector('#test').addEventListener('input',function(e){ if(e.target.value===" ") e.target.value="" })
this code dosent let users space at the first even if any users select whole text in input (ctrl+a) and then hit the space bar