Support typeahead on composite elements

Some directives wrap input elements. These changes lets the directive dig into the DOM and work on a nested input field.