You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: undefined is not a function - element[0].select() #48
After a bit debugging it seems this issue only occurs if you use the validation directives not directly on a input html element. I have a custom directive for input fields (including label, input elements and some other stuff) and I'm using the validation directive on my directive instead of the input field.
Supporting this could be achieved by something like this:
try{returnelement[0].select ? element[0].select() : element.find('input')[0].select();}catch(_error){console.warn('Error trying to select element ',_error.message,element);}
Thanks @cougar2010
Had a little bug in your code. Fixed it for my case. I'm using the selectize control
try{returnelement[0].select ? element[0].select() : element.parent().children().find('input')[0].select();}catch(_error){console.warn('Error trying to select element ',_error.message,element);}
Activity
cougar2010 commentedon Mar 24, 2015
After a bit debugging it seems this issue only occurs if you use the validation directives not directly on a input html element. I have a custom directive for input fields (including label, input elements and some other stuff) and I'm using the validation directive on my directive instead of the input field.
Supporting this could be achieved by something like this:
CarbonFactory commentedon Aug 29, 2015
Thanks @cougar2010
Had a little bug in your code. Fixed it for my case. I'm using the selectize control