Text input stealing focus when a jQuery tab is clicked -


i building web interface built around jquery tabs, first tab contains text input can used quick search through other tabs. i want textbox gain focus first tab selected, user can start typing asap.

currently i'm trying use tabsselect event bind focus-stealing function, seems i'm missing something.

my current code:

$("#usertabs").tabs().bind("tabsselect",function( event, ui){     if(ui.index == 0){         alert('fire');         $('#barcodeselect').focus();     } }); 

when click first tab, alert pops up, , dismiss it, first tab shown, textbox not have focus.

calling $('#barcodeselect').focus(); console have desired effect, shouldn't typo or that..

could changing of tab steals focus textbox? if so, there way bind on tab change being finished instead of beginning? or being oblivious?

you should use tabsshow instead of tabsselect.

tab select happens when tab clicked (so can cancel tab change returning false).

tab show happens when tab has been selected , displayed.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -