Hello! I have a certain situation I want to clarify for myself, and I would be glad if anyone has any experience with this issue and is willing to explain it to me.
I have a textarea that has a change
event handler:
textarea.bind('change', function(event){
// do something
});
Hypothetically, what if I have some sort of a click event handler that catches all user clicks:
$(document).bind('click', function(event){
event.preventDefault();
});
Will this handler also cancel blur
and change
events for a textarea if a user clicks out of it with his mouse? And if it will, how can I prevent this from happening?
Update: Thank you for your answers, I can not say that I tried it, but I have a similar situation and I am trying to rule out possibilities why change
is not firing on my textarea. In my case there is a change
handler that doesn't work if I click on an area in which all click
events are prevented by default and replaced with custom behaviour.