I would like to prevent the default event from a focusOut
(or blur
) event and keep the focus set to the specific input field.
This is what I ha
We know that it is the click function that cause the issue. So in the normal explorer like chrome, you can detact the mousedown event and then preventDefault.
But this doesn't work in ie, but we can use the beforedeactivate event instead http://msdn.microsoft.com/en-us/library/windows/apps/jj569321.aspx. It can be deteact in ie when the focus is changing. so just prevent it.
code would like this:
$inp.on('blur', function(){
self.hide();
});
isIE && $inp.on('beforedeactivate', function(evt){
mousedown && evt.preventDefault();
});
$holder.on('mousedown', function(evt){
evt.preventDefault();
mousedown = 1;
});