Can a long press be used for triggering file dialog? I came across an interesting discussion about Long Press in JavaScript, where they discuss how to trigger an event on a long press. However, this method may not work for triggering file input click in most browsers due to it not being recognized as a user activation.
var pressTimer;
$("a").mouseup(function(){
clearTimeout(pressTimer);
// Clear timeout
return false;
}).mousedown(function(){
// Set timeout
pressTimer = window.setTimeout(function()
{ fileChooser.click() // assuming fileChooser is a file input element
// This action might be blocked by several browsers.
},1000);
return false;
});