How to know where was click on blur or focusout of my input?
I've sketched a small example:
Html:
<div id ="all">
<div id="whereIsInput">
<input id="blur"/>
</div>
</div>
Css:
#whereIsInput{
height: 100px;
width: 200px;
background-color: yellow;
}
JS:
function onBlur(e){
jQuery('#all').append('<div>' + e.type + ', ' + e.target.toString() + '</div>')
}
jQuery('#blur').blur(onBlur);
jQuery('body').on('click', onBlur);
So questions is: where was click when blur is occured?
I've investigate this: 1. can't find it in blur or focusout event arguments 2. click on body occurs later then blur