I have a input[type="file"]
in my web page and when the file dialog is open and I select a file with double clicking the mouseup
event is triggered. But if I select the file and then click the Open button to select there is no extra event.
This behavior is specific to Firefox, I tested in Chrome, IE and Opera and there is not extra mouseup
event. Also there is no mousedown
event, so the log will have two sequential mouseup
events.
HTML:
<input type="file" />
JavaScript:
jQuery(document).mouseup(function(e) {
//...
});
Here is a fiddle where you can see this behavior. To see it in action make sure that the file dialog is over the Result box of the jsfiddle page.
How can I avoid this? Is this a browser bug? Googling didn't come up with any useful results.
Edit: This issue appears on my Firefox (version 32.0.1 on Win7 64bit) but not on Firefox 32.0 in Linux.