Wizzud
Thank you *very* much. Your solution works fine.
Paul
On 8 Jun, 08:47, Wizzud [EMAIL PROTECTED] wrote:
Try adding...
$(':text').bind('focus', function(){
hasFocus = $(this);
});
On Jun 5, 7:43 pm, paulj [EMAIL PROTECTED] wrote:
Wizzud, thank you for your help.
Your code
Try adding...
$(':text').bind('focus', function(){
hasFocus = $(this);
});
On Jun 5, 7:43 pm, paulj [EMAIL PROTECTED] wrote:
Wizzud, thank you for your help.
Your code worked perfectly if the user had entered the text box by
*clicking* on it.
But, if the user has *tabbed* to the text
Any good for you ... ?
$(document).ready(function(){
var hasFocus = $(':text:first').focus();
$(document).bind('click', function(event){
var ev = $(event.target);
if(ev != hasFocus){
if (ev.is(':text')){
hasFocus = ev;
}
hasFocus.focus();
}
});
});
Wizzud, thank you for your help.
Your code worked perfectly if the user had entered the text box by
*clicking* on it.
But, if the user has *tabbed* to the text box (and then clicks on
another element) the focus is returned to the text box that was last
*clicked* on.
This can be seen in my
4 matches
Mail list logo