Here's the code:
<input type="text" onblur="myFunction()">
<div style="border: 1px solid; width:300px;height:300px" onmousedown = "myOtherFunction()">
function myOtherFunction(){
console.log("mousedown on div occurred");
}
function myFunction(){
console.log("blurr occurred");
}
This works as expected if I type in something in the input and clicks on the div, triggering mousedown
before blur
. However, if I just put a debugger in myOtherFunction
and open the developer tool, the blur
event does not get fired and seems to be lost. Is it perhaps because of the 'delay' which occurs while the debugger is on?