The HTMLElement.blur() method removes keyboard focus from the current element.
HTMLElement.blur()
element.blur();