Skip to content

Instantly share code, notes, and snippets.

@Prinzhorn
Created January 6, 2014 14:43
Show Gist options
  • Save Prinzhorn/8283711 to your computer and use it in GitHub Desktop.
Save Prinzhorn/8283711 to your computer and use it in GitHub Desktop.
tap handler
var targetElement = e.currentTarget;
if(document.activeElement !== targetElement) {
if(document.activeElement) {
document.activeElement.blur();
}
targetElement.focus();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment