I'm really close now I think but not quite there. I can (nearly) get it to do it by hacking about with ticket-open.inc.php.
There are a few lines like the below:
<tr id="userRow">
<td width="120"><?php echo __('User'); ?>:</td>
<td>
<span>
<select class="userSelection" name="name" id="user-name"
data-placeholder="<?php echo __('Select User'); ?>">
</select>
</span>
<a class="inline button" style="overflow:inherit" href="#"
onclick="javascript:
$.userLookup('ajax.php/users/lookup/form', function (user) {
The userLookup control passes a callback function as above and you can add a line to do the focus:
//OLLY
$('#dynamic-form input[type=text]')[0].focus();
Which highlights the first text fields in the response zone which is great.
The problem I'm having is that this only works when changing user and doesn't seem to fire with the userlookup that appears when the page first loads. Does anyone know where the code is for this one?