event not working in firefox
<p>I have the following function which works fine in chrome:</p>

<pre><code>function updateUserID(element) {
  var username = $("#viewColTasks").val();
  var currentEvent = window.event;
  if (currentEvent.keyCode === 13){
  if (username == ''){
     $("#viewColTasks").attr("placeholder", "Please enter a valid username");
     $("#viewColTasks").val("");
  }
  else{
    var text = $(element).val();
    changeUserTo = text;
    socket.emit('getUserID', text);
    $("#viewColTasks").attr("placeholder", "Viewing " + username + "'s work");
    $("#viewColTasks").val("");
  }
 }
}
</code></pre>

<p>is this not supported in FF? I have been researching and it seems something in relation to using e as the event but I haven't managed to get anything working on both chrome and firefox</p>

<p>Any ideas?</p>
