I have input and div
<input id="input" />
<div id="div">Hello</div>
on this input i attached focus out event so whenever i click outside of the input - it gets triggered. That means also when i click on the div itself, the focus out event gets triggered.
let input = document.getElementById('input');
console.log(input);
input.addEventListener('focusout', () => {
alert('focusout event happening');
})
but i need - when i click on this div - focus out event to not be triggered on the input itself.
How can i do this ?