I have the following function:
$(document).ready(function() { $(\"#dSuggest\").keypress(function() { var dInput = $(\'input:text[name=dSuggest]\'
Just use a timeout to make your call; the timeout will be called when the event stack is finished (i.e. after the default event is called)
$("body").on('keydown', 'input[type=tel]', function (e) { setTimeout(() => { formatPhone(e) }, 0) });