I have an input inside div element. The input is hidden by default and should be visible when mouse will be over container. Upon any keydown
event the input should be hidden. Obviously user have to click on input field to entry text.
Here is my plnkr
var container = $('#container');
var flicker = $('#flicker').hide();
var log = $('#log');
container.on('mouseenter', function() {
flicker.show();
log.prepend('<div>mouseenter</div>');
});
flicker.on('keydown', function() {
flicker.hide();
setTimeout(function() {
flicker.show();
}, 4000);
})
It works perfectly on Chrome, but fails on Firefox (OS x). On Firefox the input field doesn't disappeared, and works undesirable.
Any suggestion?