Md Autocomplete: Blur on selected element (enhancement)
Couldn't find this through docs/google. Unless i am missing something, it would appear to be helpful to allow the input for autocomplete to blur when selecting an item. In devices this would naturally allow the keyboard to hide from the screen.
Thanks and great work
+1
+1
+1
Was this fixed or any update on this?
I don't understand how this is not something that is not a bit more documented, it seems to be the natural behaviour on mobile, to close the keyboard when selecting an item. I'm looking for workarounds but haven't found much.
Edit: I ended up calling blur manually:
angular.element(document.querySelector('autocomplete-id'))[0].querySelector('input').blur()
on md-selected-item-change.
Doesn't seem to break anything and it hides the keyboard on mobile. I don't know why this is not the default behaviour.
If anyone was wondering, this worked in Angular v4 for me. setTimeout(function () { document.getElementById("input-id").blur(); },0);