I saw a post about this issue, but it seemed to be closed.
I needed a code that allowed to handle click + ctrl in a form object such as a textfield. In order to work also on IE, I wrote the textfield onclick property like this
onclick="function(event){ if( event.ctrlKey) this.select()}"
and ... for Firefox, I wrote this piece of code inside a script element:
function clickPlus(){
try
{
window.addEventListener('click' ,
function(e)
{
if(e.target.tagName == 'INPUT')
{
if(e.ctrlKey)
{
try
{
e.target.select();
}
catch(ie){}
}
}
} , true);
}
catch (ie) {}
}
The try-catch around is a way to prevent IE complaining. Now it works in both browsers. The function was called in the body onload event.