The binding blur event of div. When the child element input is clicked, the blur event of div will be triggered. How to prevent it?

The binding blur event of

div. When the child element input is clicked, the blur event of div will be triggered. How to prevent

Jul.09,2021

add ev.cancelBubble = true, to input to cancel bubbling


add stop bubbling to the input click event
inputClick (e) {
e.stopPropagation ();
}


the answer above, one is non-ie, the other is the event bubbling,

Menu