JQuery: Change event from textbox html control is canceling the Click event from the html button (live events)?

It seems like your alert is squashing the button click event. If instead of alerting, you change the color of both elements, you'll see that both events get fired.

It seems like your alert is squashing the button click event. If instead of alerting, you change the color of both elements, you'll see that both events get fired. What happens is the blur/change event gets fired as soon as your mouse button goes down on the button.

Since there's an alert, you have to go and click it off and it never registers the button up on the button, which is what you need for a click event to fire. The ajax should have finished and gone onto the next event. Unless the call came back so quickly that it squashed the click even anyway.

Wow thanks! It works! It was the alert!

Is this normal? – Martin Nov 24 '10 at 18:05 As I explained, in order for a click even to fire, your mouse has to go down and then back up. You can confirm that if you just hold your mouse down on the button and then drag it away, the click event doesn't fire.

Well the same thing happened here. It registered mouse down, but then the alert came up. I presume that you then moved the mouse away clicked ok.

The alert dialog is synchronous, so all javascript execution stops. Then the mouse up is never registered. – shoebox639 Nov 24 '10 at 20:13 cool explanation!

Thanks – Martin Nov 24 '10 at 21:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions