0 Replies Latest reply on Apr 24, 2013 10:26 AM by poretsky

    InplaceInput navigation through ENTER key

    poretsky

      Hello!

      I'm using extendedDataTable with dozen inplaceInputs on it. And I'd like to implement ENTER key navigation. Functionality should be the same we have with TAB key that implemented in inplaceInput component. I'm using below JavaScript+jQuery approach:

       

       

      {code}

      //appication specific selector

      $('input[id^="'+preFix+'"][id*="main_ii_"][id$="Input"]').live("keydown", function(e) {

         if (e.keyCode == 13) {

               var str = preFix+":";

               //appication specific list of similar components

               var inputs = jQuery('input[id^="'+str+'"][id*="main_ii_"][id$="Input"]');

               //current index

               var idx = inputs.index(this);

               if (inputs[idx + 1]!=null){

                   inputs[idx + 1].focus();

                   e.preventDefault();

                   return false;

         }

      });

       

      {code}

       

      Everything works fine for me except Mozilla Firefox browser. Javascript debugging shows that code inputs[idx + 1].focus() does nothing. So, as I can see on extendedDataTable selection attribute, navigation occurs but I can't get input editor of next inplaceInput. I'd like to say it again - problem exists only in Mozilla. How can I fix it?