Event handling when onclick
I have an onclick handler for a button. When user clicks on it onBlur() is called on currently focused element rather on the button user just clicked.
Now I am handling blur as well. While handling blur I realized I dont want to execute onclick handler at all.
How can I do that?
Let me know if information provide开发者_如何学JAVAd is insufficient.
Thanks in advance.
I would set a variable during the onblur function called blurring
or something similar that is true at the beginning, then false after finishing onblur. In the onclick handler check if the blurring is true, if not then do stuff, otherwise do nothing.
精彩评论